Commit Graph

41 Commits

Author SHA1 Message Date
Kar Petrosyan
f8981f3d12
Add the 'proxy' parameter and deprecate 'proxies'. (#2879)
* Add the proxy parameter and deprecate proxies

* Make the Client.proxy and HTTPTransport.proxy types the same

* Update httpx/_transports/default.py

Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>

* Update httpx/_transports/default.py

Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>

* Drop unneeded noqa

* Changelog

* update documentation

* Allow None in mounts

* typos

* Update httpx/_types.py

* Changes proxies to proxy in CLI app

* Add proxy to request function

* Update CHANGELOG.md

Co-authored-by: Tom Christie <tom@tomchristie.com>

* Update docs/troubleshooting.md

Co-authored-by: Tom Christie <tom@tomchristie.com>

* Update docs/troubleshooting.md

Co-authored-by: Tom Christie <tom@tomchristie.com>

* Lint

---------

Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
2023-12-11 17:55:52 +04:00
Kar Petrosyan
c684e9f3aa
Hishel as an alternative for "cachecontrol" and "requests-cache". (#2866)
* Add Caching section in compatibility

* typo
2023-09-28 12:30:49 -04:00
Ben Falk
8e5e3b871b
update requests compatibility docs on query and form params (#2461) 2022-11-25 12:05:46 +00:00
František Nesveda
a2a69e4bf7
Mention default timeout differences from Requests in compatibility docs (#2433)
I was recently migrating a project from Requests to HTTPX, and I stumbled a bit on the default socket timeouts being different between the two, which I haven't seen explicitly mentioned anywhere.

This adds a mention of those differences to the compatibility section, feel free to edit it or move it around as you choose.
2022-11-07 15:25:49 +01:00
Kian Meng, Ang
82ba15b521
Fix typos (#1968) 2021-12-14 15:04:01 +01:00
Tom Christie
ee9250d60b
Add cli support (#1855)
* Add cli support

* Add setup.py

* Import main to 'httpx.main'

* Add 'cli' to requirements

* Add tests for command-line client

* Drop most CLI tests

* Add test_json

* Add test_redirects

* Coverage exclusion over _main.py in order to test more clearly

* Black formatting

* Add test_follow_redirects

* Add test_post, test_verbose, test_auth

* Add test_errors

* Remove test_errors

* Add test_download

* Change test_errors - perhaps the empty host header was causing the socket error?

* Update test_errors to not break socket

* Update docs

* Update version to 1.0.0.beta0

* Tweak CHANGELOG

* Fix up images in README

* Tweak images in README

* Update README
2021-09-14 09:44:43 +01:00
Tom Christie
47266d763b
Switch follow redirects default (#1808)
* Switch default on allow_redirects to False

* allow_redirects -> follow_redirects

* Update follow_redirects default in top-level API

* Update docs on follow_redirects
2021-09-13 13:21:22 +01:00
TAHRI Ahmed R
ecbece178f
📝 Docs patch following PR #1791 section compatibility.encoding (#1812)
* 📝 Docs patch following PR #1791 section compatibility.encoding

Reintroducing charset detection

* 📝 Amend sentence in 3080a9d66e

Co-authored-by: Tom Christie <tom@tomchristie.com>
2021-08-31 13:44:12 +01:00
Tom Christie
6a99f6f2b3
Deprecate per-request cookies (#1574)
* Deprecate per-request cookies

* Update docs/compatibility.md

Co-authored-by: Stephen Brown II <Stephen.Brown2@gmail.com>

* Update httpx/_client.py

Co-authored-by: Stephen Brown II <Stephen.Brown2@gmail.com>

* Update compatibility.md

Co-authored-by: Stephen Brown II <Stephen.Brown2@gmail.com>
2021-04-19 11:18:32 +01:00
Tom Christie
397aad98fd
Escalate the distinction between data=... and content=... to be stricter (#1573) 2021-04-16 10:06:12 +01:00
laggardkernel
ea5ffce14f
Fix redirect description about HEAD (#1520)
* Fix redirect description about HEAD

* Apply suggestions from code review

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2021-03-21 15:59:31 +01:00
Quentin Pradet
5af6ab0038
Explain REQUESTS_CA_BUNDLE migration (#1471) 2021-02-17 10:06:28 +00:00
Colton Eakins
e3a7b6d731
Updates compatibility guide to address event hooks (#1436)
* Updates compatibility guide to address event hooks

In `requests`, event hook callbacks can mutate response/request objects. In HTTPX, this is not the case.
Added text to address this difference, and added a link to the best alternate HTTPX offers in this circumstance.
 
More context:
https://github.com/encode/httpx/issues/1343#issuecomment-703223097

* Apply suggestions from code review

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-12-23 20:09:43 +01:00
Florimond Manca
7ea6019c70
Document content encoding differences with Requests (#1416)
* Document content encoding differences with Requests

* Apply suggestions from code review

* Tweak copy for Windows-1252

Co-authored-by: Jamie Hewland <jamie.hewland@hpe.com>

Co-authored-by: Jamie Hewland <jamie.hewland@hpe.com>
2020-12-06 01:16:59 +01:00
Tom Christie
0af6d9a254
Use relative links for interlinking markdown files in docs (#1390) 2020-11-13 15:03:30 +00:00
Tom Christie
3f51392bea
Add response.next_request (#1334)
* Add response.next_request

* Add response.next_request

* Add response.next_request to the docs
2020-10-01 13:52:03 +01:00
Tom Christie
feb404f86b
Seperate content=... and data=... parameters (#1266)
* Seperate content=... and data=... parameters

* Update compatibility.md
2020-09-15 13:36:10 +01:00
Bart
4bd08bed22
Update compatibility.md: mention differing query parameter handling (#1262)
* Update compatibility.md

* Update docs/compatibility.md

* Update docs/compatibility.md

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>

Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-09-10 21:22:14 +02:00
Florimond Manca
8fa87650b2
Drop urllib3 in favor of public gist (#1182)
* Drop urllib3 in favor of public gist

* Drop urllib3 coverage omit

* Drop recommendation to use urllib3 transport during Requests migration

* Add urllib3-transport to 3p pkgs

* Drop urllib3 from dependencies list in README / docs home page

Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-09-04 22:56:36 +02:00
Joe
84ca2010e1
Add proxies parameter to top-level API functions (#1198)
* Add `proxies` parameter to top-level API functions

* Fix typo
2020-08-20 15:55:35 +08:00
Tom Christie
3205536a09
Note on differences in proxy keys vs. requests (#1132)
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-08-05 19:06:03 +01:00
Srikanth Chekuri
5cf1acc403
Add docs on request instances to Requests compatibility guide (#823)
* 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>
2020-03-25 22:33:16 +01:00
wynnw
b7c0d3446c Fix typo on "synonyms" (#748) 2020-01-10 23:46:31 +01:00
Tom Christie
2038919b7e
Proposed 0.11 docs (#727)
* Proposed 0.11 docs

* Add async section and link in

* Update docs/advanced.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/quickstart.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Docs updates

* Use context-managed client instances in examples

* Update README with links to docs site, rather than to .md documents

* "99% test coverage"

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Add Client.close method to API docs

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-01-08 12:51:52 +00:00
Florimond Manca
e284b84bf9 Rename Client to AsyncClient (with compat synonym) (#680)
* Rename Client to AsyncClient (with compat synonym)

* Document motivation for AsyncClient renaming

Co-authored-by: Tom Christie <tom@tomchristie.com>
2019-12-29 15:34:23 +00:00
Florimond Manca
f9d18a8758 Rename 'read/close' to 'aread/aclose' on Response (#674)
* Switch to aread/aclose on responses

* Linting

Co-authored-by: Tom Christie <tom@tomchristie.com>
2019-12-29 15:14:53 +00:00
Tom Christie
77da6db8e8 Fix typo on "URLs" (#630) 2019-12-12 12:13:25 +01:00
Tom Christie
ec40d04382
Add aiter methods on response (#610) 2019-12-06 15:20:09 +00:00
Tom Christie
1e23855709
Warn if cert / verify / trust_env are passed to client.request() (#597)
* Add cert and verify warnings on Client.request

* Resolve typo

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Resolve typo

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* trust_env should be set on client init

* Update docs for per-Client SSL settings

* Update requests compat docs
2019-12-06 11:29:22 +00:00
Tom Christie
8d8ea8bbba
Add Client.stream() method. (#600)
* Add Client.stream() method.

* Add top-level stream API

* Documentation
2019-12-05 17:25:43 +00:00
Tom Christie
fdaa01275a
Add Response.is_error (#574) 2019-11-30 17:43:48 +00:00
Tom Christie
206c5372a6
Drop sync (#544)
Drop sync client
2019-11-27 10:43:42 +00:00
Jonas Lundberg
2dbcaf859f Document mocking compatibility (#537) 2019-11-18 12:16:06 +00:00
Florimond Manca
074cd25b04
Document client block-usage and close() (#487)
* Document client context manager vs close() usage

* Convert client snippets to use context-managed syntax
2019-10-19 13:52:44 +02:00
Jt Miclat
31730e7095 Add documentation for requests.Session compatibility (#449) 2019-10-05 19:20:18 -05:00
Jt Miclat
85fa89c49c Document compatibility difference for get, delete, head, and options (#418) 2019-10-03 19:46:24 -05:00
Kyle Galbraith
b65bce5924 Fix typos, spelling issues, and grammar in docs (#426) 2019-10-02 11:46:54 -05:00
Tom Christie
2d09d5b36c
Renaming -> httpx (#129)
* Renaming -> httpx

* Renaming to httpx
2019-07-19 15:15:16 +01:00
Tom Christie
fdc4ab2a89 Tweak compat docs 2019-06-17 17:28:27 +01:00
Tom Christie
7c6fb5c6ca
Tweaks (#89)
* Close redirect responses

* History should not be reverse-order

* History should not be reverse-order

* Docs updates
2019-06-13 16:19:39 +01:00
Tom Christie
c9747aa357
http3 (#86)
* Start fleshing out documentation

* Docs work

* http3

* Update docs

* Include lowercase status codes, for requests compat

* Updating docs

* Docs tweaks
2019-06-12 15:02:16 +01:00