Use relative links for interlinking markdown files in docs (#1390)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Tom Christie · committed by GitHub · parent 16f41a2 · Browse files · 4 files·+11 added−11 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+11 added−11 removed
- other:+11 added−11 removed
Provenance
- Commit
0af6d9a- Tree
926e456- Author
Tom Christie <tom@tomchristie.com>- Committer
GitHub <noreply@github.com>- Parent
16f41a2
4 files changed+11 added−11 removed
modified:docs/advanced.md+7 added-7 removed
10 unmodified lines11 If you do anything more than experimentation, one-off scripts, or prototypes, then you should use a `Client` instance.12 13 #### More efficient usage of network resources14 15-When you make requests using the top-level API as documented in the [Quickstart](/quickstart) guide, HTTPX has to establish a new connection _for every single request_ (connections are not reused). As the number of requests to a host increases, this quickly becomes inefficient.15+When you make requests using the top-level API as documented in the [Quickstart](quickstart.md) guide, HTTPX has to establish a new connection _for every single request_ (connections are not reused). As the number of requests to a host increases, this quickly becomes inefficient.16 17 On the other hand, a `Client` instance uses [HTTP connection pooling](https://en.wikipedia.org/wiki/HTTP_persistent_connection). This means that when you make several requests to the same host, the `Client` will reuse the underlying TCP connection, instead of recreating one for every single request.18 19 This can bring **significant performance improvements** compared to using the top-level API, including:8 unmodified lines28 29 - Cookie persistance across requests.30 - Applying configuration across all outgoing requests.31 - Sending requests through HTTP proxies.32-- Using [HTTP/2](/http2).32+- Using [HTTP/2](http2.md).33 34 The other sections on this page go into further detail about what you can do with a `Client` instance.35 36 ### Usage26 unmodified lines63 >>> r64 <Response [200 OK]>65 ```66 67-These methods accept the same arguments as `httpx.get()`, `httpx.post()`, etc. This means that all features documented in the [Quickstart](/quickstart) guide are also available at the client level.67+These methods accept the same arguments as `httpx.get()`, `httpx.post()`, etc. This means that all features documented in the [Quickstart](quickstart.md) guide are also available at the client level.68 69 For example, to send a request with custom headers:70 71 ```pycon70 unmodified lines142 >>> r.request.url143 URL('http://httpbin.org/headers')144 ```145 146-For a list of all available client parameters, see the [`Client`](/api/#client) API reference.146+For a list of all available client parameters, see the [`Client`](api.md#client) API reference.147 148 ## Calling into Python Web Apps149 150 You can configure an `httpx` client to call directly into a Python web application using the WSGI protocol.38 unmodified lines189 ```190 191 ## Request instances192 193-For maximum control on what gets sent over the wire, HTTPX supports building explicit [`Request`](/api#request) instances:193+For maximum control on what gets sent over the wire, HTTPX supports building explicit [`Request`](api.md#request) instances:194 195 ```python196 request = httpx.Request("GET", "https://example.com")197 ```338 unmodified lines536 #### Environment variables537 538 HTTP proxying can also be configured through environment variables, although with less fine-grained control.539 540-See documentation on [`HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`](/environment_variables/#http_proxy-https_proxy-all_proxy) for more information.540+See documentation on [`HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`](environment_variables.md#http_proxy-https_proxy-all_proxy) for more information.541 542 ### Proxy mechanisms543 544 !!! note129 unmodified lines674 ```675 676 ## Multipart file encoding677 678-As mentioned in the [quickstart](/quickstart#sending-multipart-file-uploads)678+As mentioned in the [quickstart](quickstart.md#sending-multipart-file-uploads)679 multipart file encoding is available by passing a dictionary with the680 name of the payloads as keys and either tuple of elements or a file-like object or a string as values.681 682 ```pycon377 unmodified linesmodified:docs/compatibility.md+2 added-2 removed
96 unmodified lines97989910010110110210310310410510610724 unmodified lines96 unmodified lines```
## Request instantiation
There is no notion of [prepared requests](https://requests.readthedocs.io/en/stable/user/advanced/#prepared-requests) in HTTPX. If you need to customize request instantiation, see [Request instances](/advanced#request-instances).There is no notion of [prepared requests](https://requests.readthedocs.io/en/stable/user/advanced/#prepared-requests) in HTTPX. If you need to customize request instantiation, see [Request instances](advanced.md#request-instances).
Besides, `httpx.Request()` does not support the `auth`, `timeout`, `allow_redirects`, `proxies`, `verify` and `cert` parameters. However these are available in `httpx.request`, `httpx.get`, `httpx.post` etc., as well as on [`Client` instances](/advanced#client-instances).Besides, `httpx.Request()` does not support the `auth`, `timeout`, `allow_redirects`, `proxies`, `verify` and `cert` parameters. However these are available in `httpx.request`, `httpx.get`, `httpx.post` etc., as well as on [`Client` instances](advanced.md#client-instances).
## Mocking
If you need to mock HTTPX the same way that test utilities like `responses` and `requests-mock` does for `requests`, see [RESPX](https://github.com/lundberg/respx).24 unmodified linesmodified:docs/environment_variables.md+1 added-1 removed
139 unmodified lines140 141 * [cURL](https://github.com/curl/curl/blob/master/docs/MANUAL.md#environment-variables)142 * [requests](https://github.com/psf/requests/blob/master/docs/user/advanced.rst#proxies)143 144-For more information on using proxies in HTTPX, see [HTTP Proxying](/advanced/#http-proxying).144+For more information on using proxies in HTTPX, see [HTTP Proxying](advanced.md#http-proxying).145 146 ### `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`147 148 Valid values: A URL to a proxy31 unmodified linesmodified:docs/third-party-packages.md+1 added-1 removed
43 unmodified lines44454647484843 unmodified lines### urllib3-transport
[GitHub](https://gist.github.com/florimondmanca/d56764d78d748eb9f73165da388e546e)
This public gist provides an example implementation for a [custom transport](/advanced#custom-transports) implementation on top of the battle-tested [`urllib3`](https://urllib3.readthedocs.io) library.This public gist provides an example implementation for a [custom transport](advanced.md#custom-transports) implementation on top of the battle-tested [`urllib3`](https://urllib3.readthedocs.io) library.