Commit Graph

215 Commits

Author SHA1 Message Date
Vibhu Agarwal
f8cb7f5f02
[Docs] Add AnyIO under "Supported async environments" (#1673)
* [Docs] Add AnyIO under "Supported async environments"

* Update docs/async.md

Co-authored-by: Florimond Manca <15911462+florimondmanca@users.noreply.github.com>

Co-authored-by: Florimond Manca <15911462+florimondmanca@users.noreply.github.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2021-06-16 07:19:39 +02:00
Mei
604d09d7d7
Add netrc environment variable into the documentation (#1675)
* Adding netrc environment variable documentation

* Update docs/environment_variables.md

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

* Modifications about netrcfile environment variable

* Change uppercase "A" in netrcfile env variable into lowercase

* Added some words and a dot before "my_netrc" in the console example

* changed a typo "rather that" into "rather than" in advanced.md

* changed netrc environment variable in example part

* modified title for netrc environment variable part in doc

* Deleted the dot in title of netrc environment variable

Co-authored-by: Tom Christie <tom@tomchristie.com>
2021-06-16 07:04:47 +02:00
K900
776dbb578b
docs: slightly clarify event hooks (#1645)
* Be more specific about when the hooks are called
* Explicitly mention and demonstrate that hooks are allowed to modify requests

See https://github.com/encode/httpx/discussions/1637
2021-05-21 10:30:30 +01:00
Jaakko Lappalainen
7025dd1952
fix typo in http2 section (#1632) 2021-05-09 00:49:14 +08:00
Vytautas Liuolia
2e4b308d7a
Make the MockTransport example more robust/correct (#1621) 2021-05-02 20:04:12 +02:00
Tom Christie
760af43b4f
Update brotli support to use the brotlicffi package (#1605)
* Update brotli support to use the brotlicffi package
2021-04-28 10:09:29 +01:00
Tom Christie
0c2cb240df
Version 0.18.0 (#1576)
* Version 0.18.0
2021-04-27 15:20:22 +01:00
Tom Christie
9b8f5af759
httpx.ResponseClosed -> httpx.StreamClosed (#1584)
* ResponseClosed -> StreamClosed

* Update docs for StreamClosed
2021-04-21 10:51:35 +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
8fd5b71016
Drop StreamContextManager in favour of contextlib.contextmanager/asynccontextmanager (#1577)
* Drop StreamContextManager in favour of using contextlib.contextmanager/asyncontextmanager

* Use type: ignore to avoid mypy errors on 3.6
2021-04-19 11:07:07 +01:00
Tom Christie
397aad98fd
Escalate the distinction between data=... and content=... to be stricter (#1573) 2021-04-16 10:06:12 +01:00
Tom Christie
110ce85652
Stream interface (#1550)
* Add SyncByteStream, AsyncByteStream to interface

* request.stream and response.stream as httpx.SyncByteStream/httpx.AsyncByteStream

* Update httpx/_transports/base.py

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

* Update httpx/_transports/default.py

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

* Move response classes in transports to module level

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2021-04-13 13:14:04 +01:00
Hemanth kumar
535df6c998
Added docs for using client-side ssl certificates (#1570)
* Added docs for using client-side ssl certificates

* Update docs/advanced.md

Co-authored-by: Joe <nigelchiang@outlook.com>

* Update docs/advanced.md

Co-authored-by: Joe <nigelchiang@outlook.com>

* Update docs/advanced.md

* Update docs/advanced.md

* Update docs/advanced.md

Co-authored-by: Hemanth <hemanth@actionfi.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: Joe <nigelchiang@outlook.com>
2021-04-13 20:08:22 +08:00
Colin Bounouar
4dec569749
Add httpx-auth and pytest-httpx to third party documentation (#1560) 2021-04-07 23:02:44 +02:00
Jaakko Lappalainen
c1ccdbcb81
added docs for startup/shutdown of ASGI apps (#1554) 2021-04-05 10:55:57 +02:00
Louis Maddox
68cf1ff88a
Fix typo to match library default (#1535)
Matches default given at https://github.com/encode/httpx/blob/master/httpx/_config.py#L359
2021-03-25 11:03:47 +00:00
Tom Christie
437b55c520
Refine project workflow (#1534)
* Refine project workflow

* Fix link to third party packages
2021-03-24 16:48:57 +00:00
Tom Christie
1a6e254f72
Transport API (#1522)
* Added httpx.BaseTransport and httpx.AsyncBaseTransport

* Test coverage and default transports to calling .close on __exit__

* BaseTransport documentation

* Use 'handle_request' for the transport API.

* Docs tweaks

* Docs tweaks

* Minor docstring tweak

* Transport API docs

* Drop 'Optional' on Transport API

* Docs tweaks

* Tweak CHANGELOG

* Drop erronous example.py

* Push httpcore exception wrapping out of client into transport (#1524)

* Push httpcore exception wrapping out of client into transport

* Include close/aclose extensions in docstring

* Comment about the request property on RequestError exceptions

* Extensions reason_phrase and http_version as bytes (#1526)

* Extensions reason_phrase and http_version as bytes

* Update BaseTransport docstring

* Neaten up our try...except structure for ensuring responses (#1525)

* Fix CHANGELOG typo

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

* Fix CHANGELOG typo

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

* stream: Iterator[bytes] -> stream: Iterable[bytes]

* Use proper bytestream interfaces when calling into httpcore

* Grungy typing workaround due to httpcore using Iterator instead of Iterable in bytestream types

* Update docs/advanced.md

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

* Consistent typing imports across tranports

* Update docs/advanced.md

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

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2021-03-24 12:36:34 +00: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
Tom Christie
59f65e2b98
Version 0.17.0 (#1403)
* Version 0.17.0

* Update changelog

* Tweak verbs

* Fix backtick

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

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Jamie Hewland <jamie.hewland@hpe.com>
2021-02-28 17:05:01 +01:00
Quentin Pradet
645ae4ed9c
Explain SSL_CERT_DIR specific format (#1470)
It's easy to believe that any .pem files there will get picked up automatically, but that's not the case.
2021-02-17 10:11:08 +00:00
Quentin Pradet
5af6ab0038
Explain REQUESTS_CA_BUNDLE migration (#1471) 2021-02-17 10:06:28 +00:00
David Bordeynik
2847869475
fix-1457: URL's full_path -> raw_path from pull #1285 in docs as well (#1458) 2021-02-07 09:33:45 +01:00
Simon Willison
c52e7d212f
Added missing Request __init__ parameters (#1456)
Co-authored-by: Joe <nigelchiang@outlook.com>
2021-02-07 11:48:23 +08:00
Daniel Saxton
9542a17831
Fix doc capitalization (#1460) 2021-02-07 00:23:30 +01:00
Tom Christie
89fb0cbc69
Add HTTPTransport and AsyncHTTPTransport (#1399)
* Add keepalive_expiry to Limits config

* keepalive_expiry should be optional. In line with httpcore.

* HTTPTransport and AsyncHTTPTransport

* Update docs for httpx.HTTPTransport()

* Update type hints

* Fix docs typo

* Additional mount example

* Tweak context manager methods

* Add 'httpx.HTTPTransport(proxy=...)'

* Use explicit keyword arguments throughout httpx.HTTPTransport

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2021-01-08 10:23:56 +00:00
nkitsaini
181639322e
Update README to reflect new estimate for v1.0 release (#1445)
Co-authored-by: Ankit <ankit@jpqr.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2021-01-07 07:57:25 +01:00
Tom Christie
9c7c2ace99
Add httpx.MockTransport() (#1401)
* Add httpx.MockTransport

* Add docs on MockTransport

* Add pointer to RESPX

* Add note on pytest-httpx

* Tweak existing docs example to use 'httpx.MockTransport'

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2021-01-06 11:04:26 +00:00
Konstantin
3bf18637c1
Remove double "then" in docs/http2.md (#1442) 2020-12-30 17:21:35 +01:00
Florimond Manca
25781a7625
Add troubleshooting guide, with initial proxies entries (#1435)
* Add troubleshooting guide, with initial proxies entries

* Drop unrelated issue
2020-12-29 13:40:53 +01:00
Florimond Manca
7f9bb5f32d
Remove stale reference to "Travis" (#1440) 2020-12-29 13:38:04 +01:00
shan7030
f4165e9e09
Add curio docs in Supported async environments (#1437)
Fixes: #1418
2020-12-25 16:57:14 +01: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
Gerhard van Andel
3c89b91d6b
Update exceptions.md (#1432) 2020-12-20 20:43:33 +01:00
Florimond Manca
584a40513f
Tweak advanced timeouts docs (#1420) 2020-12-08 14:31:00 +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
c4d2e6fa28
Add support for Mount API (#1362)
* Add support for Mount API

* Add test cases

* Add test case for all: mounted transport

* Use 'transport' variable, in preference to 'proxy'

* Add docs for mounted transports
2020-11-24 10:35:51 +00:00
Tom Christie
0af6d9a254
Use relative links for interlinking markdown files in docs (#1390) 2020-11-13 15:03:30 +00:00
podhmo
f8f543057a
fix code example, in async.md (#1388) 2020-11-11 09:10:33 +00:00
Tom Christie
ceccb964e6
Update butterfly logo (#1382) 2020-11-10 10:16:07 +00:00
Kyungmin Lee
84dca25b8e
Fix typo (#1386)
* Fix typo

three greater-than signs -> three dots

* Fix typo

three greater-than signs -> three dots

* Fix typo

three greater-than signs -> three dots
2020-11-08 10:28:38 +01:00
Aber
1bc3b0188a
Add new project to Third Party Packages (#1364)
* Add new project to Third Party Packages

* Fix typo

Co-authored-by: Josep Cugat <jcugat@gmail.com>

* Update third-party-packages.md

Co-authored-by: Josep Cugat <jcugat@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-10-24 23:32:51 +02:00
Tom Christie
dbbcf438cd
Version 0.16 (#1347) 2020-10-06 15:29:40 +01:00
Tom Christie
0eed6a3734
Drop .next()/.anext() in favour of response.next_request (#1339)
* Drop response.next()/response.anext() in favour of response.next_request

* Drop NotRedirectResponse
2020-10-06 14:53:07 +01:00
Jair Henrique
4487ac067c
Add VCR.py to third party packages doc. (#1345) 2020-10-05 22:11:52 +02: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
emlazzarin
257b8fab6a
update arg name to max_keepalive_connections (#1309)
The old name `max_keepalive` was removed recently, so this updates the docs.
2020-09-23 10:42:21 +01:00
Tom Christie
c923f1af91
Update docs for 0.15 (#1306) 2020-09-22 11:57:14 +01:00
Tom Christie
fbb21fb1ae
Drop ContentStream (#1295)
* Drop ContentStream
2020-09-18 08:41:09 +01:00
Tom Christie
ff0febbaa9
Update README.md (#1291)
* Update README.md

* Update index.md
2020-09-17 09:11:41 +01:00