]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Add docs on request instances to Requests compatibility guide (#823)
authorSrikanth Chekuri <srikanth.chekuri92@gmail.com>
Wed, 25 Mar 2020 21:33:16 +0000 (03:03 +0530)
committerGitHub <noreply@github.com>
Wed, 25 Mar 2020 21:33:16 +0000 (22:33 +0100)
* Update docs/compatibility.md

* Add prepare_request equivalent of httpx to compatibility document

* Add difference b/w httpx.Request and requests.Request arguments to compatibility document

* Update docs/compatibility.md
* Remove Request arguments section
* Add new section Request instantiation with necessary info

* Update docs/compatibility.md

Commit the suggested changes

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
docs/compatibility.md

index 89235b12626d87b1181778cf883803a968b0a79b..c827f35221c17aa7d5915c9e5c6b23442fb86584 100644 (file)
@@ -64,6 +64,12 @@ is generally equivalent to
 client = httpx.Client(**kwargs)
 ```
 
+## 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).
+
+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).
+
 ## 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).