Skip to content
Myr

Fix typos, spelling issues, and grammar in docs (#426)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kyle Galbraith · committed by Seth Michael Larson · parent 9bbd040 · Browse files · 7 files+23 added−24 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

7 files+23 added−24 removed

  • other:+23 added−24 removed

7 files+23 added−24 removed

modified:docs/advanced.md+4 added-4 removed
modified:docs/compatibility.md+1 added-1 removed
modified:docs/contributing.md+4 added-4 removed
1# Contributing23Thank you for being interested in contributing with HTTPX.4There are many ways you can contribute with the project:3Thank you for being interested in contributing to HTTPX.4There are many ways you can contribute to the project:56- Try HTTPX and [report bugs/issues you find](https://github.com/encode/httpx/issues/new)7- [Implement new features](https://github.com/encode/httpx/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)8- [Review Pull Requests of others](https://github.com/encode/httpx/pulls)
49 unmodified lines
58We use [nox](https://nox.thea.codes/en/stable/) to automate testing, linting,59and documentation building workflow. Make sure you have it installed60at your system before starting.6162Install nox with:62Install `nox` with:6364```shell65$ python3 -m pip install --user nox66```
4 unmodified lines
71```shell72$ pipx install nox73```7475Now, with nox installed run the complete pipeline with:75Now, with nox installed, run the complete pipeline with:7677```shell78$ nox79```
56 unmodified lines
modified:docs/index.md+1 added-1 removed
101 unmodified lines
102* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*103104A huge amount of credit is due to `requests` for the API layout that105much of this work follows, as well as to `urllib3` for plenty of design106inspiration around the lower level networking details.106inspiration around the lower-level networking details.107108## Installation109110Install with pip:
6 unmodified lines
modified:docs/parallel.md+4 added-5 removed
35 unmodified lines
36```3738## Exceptions and Cancellations3940The style of using `parallel` blocks ensures that you'll always have well41defined exception and cancellation behaviours. Request exceptions are only ever42raised when calling either `get_response` or `next_response`, and any pending43requests are cancelled on exiting the block.40The style of using `parallel` blocks ensures that you'll always have a well-defined exception and cancellation behaviors. Request exceptions are only ever41raised when calling either `get_response` or `next_response` and any pending42requests are canceled on exiting the block.4344## Parallel requests with a Client4546You can also call `parallel()` from a client instance, which allows you to48control the authentication or dispatch behaviour for all requests within the47control the authentication or dispatch behavior for all requests within the48block.4950```python51>>> client = httpx.Client()
19 unmodified lines
modified:docs/quickstart.md+8 added-8 removed
3 unmodified lines
4 This page closely follows the layout of the `requests` QuickStart documentation.5 The `httpx` library is designed to be API compatible with `requests` wherever6 possible.78First start by importing HTTPX:8First, start by importing HTTPX:910```11>>> import httpx12```
48 unmodified lines
61```6263## Response Content6465HTTPX will automatically handle decoding the response content into unicode text.65HTTPX will automatically handle decoding the response content into Unicode text.6667```python68>>> r = httpx.get('https://www.example.org/')69>>> r.text
57 unmodified lines
127128## Sending Form Encoded Data129130Some types of HTTP requests, such as `POST` and `PUT` requests, can include data131in the request body. One common way of including that is as form encoded data,131in the request body. One common way of including that is as form-encoded data,132which is used for HTML forms.133134```python135>>> data = {'key1': 'value1', 'key2': 'value2'}
61 unmodified lines
197```198199## Sending JSON Encoded Data200201Form encoded data is okay if all you need is simple key-value data structure.201Form encoded data is okay if all you need is a simple key-value data structure.202For more complicated data structures you'll often want to use JSON encoding instead.203204```python205>>> data = {'integer': 123, 'boolean': True, 'list': ['a', 'b', 'c']}
15 unmodified lines
221```222223## Sending Binary Request Data224225For other encodings you should use either a `bytes` type, or a generator225For other encodings, you should use either a `bytes` type or a generator226that yields `bytes`.227228You'll probably also want to set a custom `Content-Type` header when uploading229binary data.
60 unmodified lines
290>>> r.headers.get('content-type')291'application/json'292```293294Multiple values for a single response header are represented as a single comma separated294Multiple values for a single response header are represented as a single comma-separated295value, as per [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2):296297> A recipient MAY combine multiple header fields with the same field name into one “field-name: field-value” pair, without changing the semantics of the message, by appending each subsequent field value to the combined field value in order, separated by a comma.297> A recipient MAY combine multiple header fields with the same field name into one “field-name: field-value” pair, without changing the semantics of the message, by appending each subsequent field-value to the combined field value in order, separated by a comma.298299## Cookies300301Any cookies that are set on the response can be easily accessed:
26 unmodified lines
328```329330## Redirection and History331332By default HTTPX will follow redirects for anything except `HEAD` requests.332By default, HTTPX will follow redirects for anything except `HEAD` requests.333334The `history` property of the response can be used to inspect any followed redirects.335It contains a list of all any redirect responses that were followed, in the order336in which they were made.
68 unmodified lines
modified:README.md+1 added-1 removed
107 unmodified lines
108* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*109110A huge amount of credit is due to `requests` for the API layout that111much of this work follows, as well as to `urllib3` for plenty of design112inspiration around the lower level networking details.112inspiration around the lower-level networking details.113114<p align="center">&mdash; ⭐️ &mdash;</p>115<p align="center"><i>HTTPX is <a href="https://github.com/encode/httpx/blob/master/LICENSE.md">BSD licensed</a> code. Designed & built in Brighton, England.</i></p>