]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Fix sections references (#3058)
authorKar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
Mon, 15 Jan 2024 11:15:31 +0000 (15:15 +0400)
committerGitHub <noreply@github.com>
Mon, 15 Jan 2024 11:15:31 +0000 (11:15 +0000)
docs/advanced/clients.md
docs/advanced/proxies.md
docs/advanced/transports.md
docs/async.md
docs/compatibility.md
docs/environment_variables.md
docs/index.md
docs/quickstart.md
docs/third_party_packages.md
docs/troubleshooting.md

index 6905724dcdc727f135f7eb2061e46968d1facd1e..a55fc596fb158e33c9d32ca3114a3a4264a7b145 100644 (file)
@@ -8,7 +8,7 @@
 
 **More efficient usage of network resources**
 
-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.
+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.
 
 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.
 
@@ -25,7 +25,7 @@ This can bring **significant performance improvements** compared to using the to
 - Cookie persistence across requests.
 - Applying configuration across all outgoing requests.
 - Sending requests through HTTP proxies.
-- Using [HTTP/2](http2.md).
+- Using [HTTP/2](../http2.md).
 
 The other sections on this page go into further detail about what you can do with a `Client` instance.
 
@@ -60,7 +60,7 @@ Once you have a `Client`, you can send requests using `.get()`, `.post()`, etc.
 <Response [200 OK]>
 ```
 
-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.
+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.
 
 For example, to send a request with custom headers:
 
@@ -139,13 +139,13 @@ For example, `base_url` allows you to prepend an URL to all outgoing requests:
 URL('http://httpbin.org/headers')
 ```
 
-For a list of all available client parameters, see the [`Client`](api.md#client) API reference.
+For a list of all available client parameters, see the [`Client`](../api.md#client) API reference.
 
 ---
 
 ## Request instances
 
-For maximum control on what gets sent over the wire, HTTPX supports building explicit [`Request`](api.md#request) instances:
+For maximum control on what gets sent over the wire, HTTPX supports building explicit [`Request`](../api.md#request) instances:
 
 ```python
 request = httpx.Request("GET", "https://example.com")
@@ -203,7 +203,7 @@ with tempfile.NamedTemporaryFile() as download_file:
                 num_bytes_downloaded = response.num_bytes_downloaded
 ```
 
-![tqdm progress bar](img/tqdm-progress.gif)
+![tqdm progress bar](../img/tqdm-progress.gif)
 
 Or an alternate example, this time using the [`rich`](https://github.com/willmcgugan/rich) library…
 
@@ -265,7 +265,7 @@ httpx.post("https://httpbin.org/post", content=gen())
 
 ## Multipart file encoding
 
-As mentioned in the [quickstart](quickstart.md#sending-multipart-file-uploads)
+As mentioned in the [quickstart](../quickstart.md#sending-multipart-file-uploads)
 multipart file encoding is available by passing a dictionary with the
 name of the payloads as keys and either tuple of elements or a file-like object or a string as values.
 
index d51b241a2ccf9b34446a6396d340ab45210e8517..2a6b7d5f3695cd296ce6d283ffe07af600b0aceb 100644 (file)
@@ -63,7 +63,7 @@ How exactly step 2/ is performed depends on which of two proxying mechanisms is
 
 ### Troubleshooting proxies
 
-If you encounter issues when setting up proxies, please refer to our [Troubleshooting guide](troubleshooting.md#proxies).
+If you encounter issues when setting up proxies, please refer to our [Troubleshooting guide](../troubleshooting.md#proxies).
 
 ## SOCKS
 
index 100b562469fdcd6a1bc6d9daf2e7300e141c0958..135797d5cdf06dc9f8049fc3744bc83ae8bc8399 100644 (file)
@@ -341,4 +341,4 @@ mounts = {
 There are also environment variables that can be used to control the dictionary of the client mounts. 
 They can be used to configure HTTP proxying for clients.
 
-See documentation on [`HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`](environment_variables.md#http_proxy-https_proxy-all_proxy) for more information.
+See documentation on [`HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`](../environment_variables.md#http_proxy-https_proxy-all_proxy) for more information.
index 1138c30c56b0c4bb2ec4dbacc99d157537b849ef..9b679006a6ddd7fc9b8fbd93b4f270a1e8128546 100644 (file)
@@ -84,7 +84,7 @@ The async response streaming methods are:
 * `Response.aiter_raw()` - For streaming the raw response bytes, without applying content decoding.
 * `Response.aclose()` - For closing the response. You don't usually need this, since `.stream` block closes the response automatically on exit.
 
-For situations when context block usage is not practical, it is possible to enter "manual mode" by sending a [`Request` instance](./advanced.md#request-instances) using `client.send(..., stream=True)`.
+For situations when context block usage is not practical, it is possible to enter "manual mode" by sending a [`Request` instance](advanced/clients.md#request-instances) using `client.send(..., stream=True)`.
 
 Example in the context of forwarding the response to a streaming web endpoint with [Starlette](https://www.starlette.io):
 
index 7190b6589852a971d6b560d1d7aaeeb76986e8bc..e820a67b073dfed97dc2ab35ad7db702b91d8932 100644 (file)
@@ -159,7 +159,7 @@ httpx.get('https://www.example.com', timeout=None)
 
 HTTPX uses the mounts argument for HTTP proxying and transport routing.
 It can do much more than proxies and allows you to configure more than just the proxy route.
-For more detailed documentation, see [Mounting Transports](advanced.md#mounting-transports).
+For more detailed documentation, see [Mounting Transports](advanced/transports.md#mounting-transports).
 
 When using `httpx.Client(mounts={...})` to map to a selection of different transports, we use full URL schemes, such as `mounts={"http://": ..., "https://": ...}`.
 
@@ -197,9 +197,9 @@ We don't support `response.is_ok` since the naming is ambiguous there, and might
 
 ## 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.md#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/clients.md#request-instances).
 
-Besides, `httpx.Request()` does not support the `auth`, `timeout`, `follow_redirects`, `mounts`, `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).
+Besides, `httpx.Request()` does not support the `auth`, `timeout`, `follow_redirects`, `mounts`, `verify` and `cert` parameters. However these are available in `httpx.request`, `httpx.get`, `httpx.post` etc., as well as on [`Client` instances](advanced/clients.md#client-instances).
 
 ## Mocking
 
@@ -227,4 +227,4 @@ For both query params (`params=`) and form data (`data=`), `requests` supports s
 
 In HTTPX, event hooks may access properties of requests and responses, but event hook callbacks cannot mutate the original request/response.
 
-If you are looking for more control, consider checking out [Custom Transports](advanced.md#custom-transports).
+If you are looking for more control, consider checking out [Custom Transports](advanced/transports.md#custom-transports).
index 71329fc16c8ef9b801cfcc36423701d88df3c138..28fdc5e8afc13ba6ce77a33ee05f77c0b5b143c8 100644 (file)
@@ -75,7 +75,7 @@ The environment variables documented below are used as a convention by various H
 * [cURL](https://github.com/curl/curl/blob/master/docs/MANUAL.md#environment-variables)
 * [requests](https://github.com/psf/requests/blob/master/docs/user/advanced.rst#proxies)
 
-For more information on using proxies in HTTPX, see [HTTP Proxying](advanced.md#http-proxying).
+For more information on using proxies in HTTPX, see [HTTP Proxying](advanced/proxies.md#http-proxying).
 
 ### `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`
 
index ec9746697ddd215afa0493f6d6c7d08d6e2f7160..86b6d1cbaa1140840c1d3eea1a11357741a78c22 100644 (file)
@@ -68,7 +68,7 @@ HTTPX builds on the well-established usability of `requests`, and gives you:
 * A broadly [requests-compatible API](compatibility.md).
 * Standard synchronous interface, but with [async support if you need it](async.md).
 * HTTP/1.1 [and HTTP/2 support](http2.md).
-* Ability to make requests directly to [WSGI applications](advanced.md#calling-into-python-web-apps) or [ASGI applications](async.md#calling-into-python-web-apps).
+* Ability to make requests directly to [WSGI applications](async.md#calling-into-python-web-apps) or [ASGI applications](async.md#calling-into-python-web-apps).
 * Strict timeouts everywhere.
 * Fully type annotated.
 * 100% test coverage.
@@ -95,7 +95,7 @@ Plus all the standard features of `requests`...
 
 For a run-through of all the basics, head over to the [QuickStart](quickstart.md).
 
-For more advanced topics, see the [Advanced Usage](advanced.md) section,
+For more advanced topics, see the **Advanced** section,
 the [async support](async.md) section, or the [HTTP/2](http2.md) section.
 
 The [Developer Interface](api.md) provides a comprehensive API reference.
index 068547ffc99518d81e5b9d6f02dd47b03a907f81..974119f72cfce2e7a38864cd15366eb604d7f3c0 100644 (file)
@@ -462,7 +462,7 @@ You can also disable the timeout behavior completely...
 >>> httpx.get('https://github.com/', timeout=None)
 ```
 
-For advanced timeout management, see [Timeout fine-tuning](advanced.md#fine-tuning-the-configuration).
+For advanced timeout management, see [Timeout fine-tuning](advanced/timeouts.md#fine-tuning-the-configuration).
 
 ## Authentication
 
index 3d5f4778ec74469ac82adc447b93b76828ef3349..f6ce96d7023e12be19ce9114edcd0202818f580b 100644 (file)
@@ -28,7 +28,7 @@ An asynchronous GitHub API library. Includes [HTTPX support](https://gidgethub.r
 
 [GitHub](https://github.com/Colin-b/httpx_auth) - [Documentation](https://colin-b.github.io/httpx_auth/)
 
-Provides authentication classes to be used with HTTPX [authentication parameter](advanced.md#customizing-authentication).
+Provides authentication classes to be used with HTTPX [authentication parameter](advanced/authentication.md#customizing-authentication).
 
 ### pytest-HTTPX
 
@@ -80,4 +80,4 @@ A library for scraping the web built on top of HTTPX.
 
 [GitHub](https://gist.github.com/florimondmanca/d56764d78d748eb9f73165da388e546e)
 
-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.
+This public gist provides an example implementation for a [custom transport](advanced/transports.md#custom-transports) implementation on top of the battle-tested [`urllib3`](https://urllib3.readthedocs.io) library.
index a0cb210ccf7e3c9258ab66d64aff6471f6688c39..a2ca15f5640e496fc9a5f2652037e1845ce13231 100644 (file)
@@ -27,7 +27,7 @@ mounts = {
 
 Using this setup, you're telling HTTPX to connect to the proxy using HTTP for HTTP requests, and using HTTPS for HTTPS requests.
 
-But if you get the error above, it is likely that your proxy doesn't support connecting via HTTPS. Don't worry: that's a [common gotcha](advanced.md#example).
+But if you get the error above, it is likely that your proxy doesn't support connecting via HTTPS. Don't worry: that's a [common gotcha](advanced/proxies.md#http-proxies).
 
 Change the scheme of your HTTPS proxy to `http://...` instead of `https://...`:
 
@@ -46,7 +46,7 @@ with httpx.Client(proxy=proxy) as client:
   ...
 ```
 
-For more information, see [Proxies: FORWARD vs TUNNEL](advanced.md#forward-vs-tunnel).
+For more information, see [Proxies: FORWARD vs TUNNEL](advanced/proxies.md#forward-vs-tunnel).
 
 ---