Piotr Staroszczyk
efe9f61bc2
Drop RedirectLoop exception ( #819 )
...
* drop RedirectLoop exception
* tests is package to allow run it easly
* bring back test for redirect loop
2020-02-24 10:09:52 +00:00
Florimond Manca
82dc6f32f8
Switch to private module names ( #785 )
...
* Rename modules
* Update names in package
* Fix tests
* Review docs
2020-01-28 14:34:43 +00:00
Tom Christie
1f8fb28d93
Handle redirect with malformed Location headers missing host. ( #774 )
2020-01-17 11:42:51 +00:00
Tom Christie
5a63540e8a
Fix for streaming a redirect response body with allow_redirects=False ( #766 )
2020-01-17 09:45:37 +00:00
Tom Christie
e19bd9bc4b
Dispatcher -> AsyncDispatcher ( #725 )
...
* Dispatcher -> AsyncDispatcher
* Fix invalid renamings
* Fix invalid renamings
2020-01-06 12:08:14 +00:00
Florimond Manca
910aa9094c
Repurpose RedirectBodyUnavailable as RequestBodyUnavailable ( #690 )
2020-01-03 22:25:55 +01:00
Tom Christie
b8394f1e00
Bump coverage ( #705 )
...
* Bump coverage
* Tests for iterative text decoding with 'aiter_text'
* nocover on xfail exception cases
* nocover API that is pending deprecation
* Tweak test to removed uncovered line
* Ingest request body in RedirectBodyUnavailable test case
2020-01-01 15:33:24 +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
3462999366
Rename 'next' to 'anext' on Response ( #676 )
...
* Rename 'next' to 'anext' on Response
* Drop iscoroutinefunction() check
Co-authored-by: Tom Christie <tom@tomchristie.com>
2019-12-29 15:34:07 +00:00
Florimond Manca
d0427bead0
Clean up 'backend' fixture ( #664 )
...
* Clean up 'backend' fixture
* Add docstring to 'async_environment' fixture
2019-12-21 16:08:40 +01:00
Tom Christie
cee1fccaca
Use Streams API for both requests and responses. ( #648 )
...
* Internal ContentStreams API
2019-12-20 16:05:04 +00:00
Tom Christie
8d4f182500
Added RequestContent ( #636 )
...
* Request Content
* Added RequestContent interface
* Docstrings on 'encode(data, files, json)'
* Update httpx/content.py
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
* can_rewind -> can_replay
2019-12-18 10:51:34 +00:00
Florimond Manca
ab41a5d5c3
Refactor tests in the light of backend auto-detection ( #615 )
...
* Refactor tests in the light of backend auto-detection
* Test passing explicit backend separately
* Drop 'backend=backend'
* Fix usage of asyncio.run() on 3.6
2019-12-07 15:17:35 +01:00
Tom Christie
d15dc0b1f8
Tighten up top-level API to only expose public API ( #608 )
...
* Tighten up top-level API to only expose public API
* Leave HTTPProxyMode for backwards compat, raising warnings.
* Add missing import
2019-12-06 15:20:01 +00:00
Tom Christie
206c5372a6
Drop sync ( #544 )
...
Drop sync client
2019-11-27 10:43:42 +00:00
Tom Christie
5aca0c0172
Fix redirect cookie behavior ( #529 )
...
* Fix redirect cookie behavior
* Drop flake8-comprehensions
* Add redirect cookie tests
2019-11-15 21:31:15 +00:00
Tom Christie
5961bd8ba3
Apply black formatting
2019-09-04 15:11:40 +01:00
Tom Christie
4336550d22
Add tests for dropping Content-Length headers
2019-09-04 15:06:14 +01:00
Florimond Manca
40e6e8c99d
Refactor client functionality into middleware ( #268 )
...
Co-authored-by: yeraydiazdiaz <yeraydiazdiaz@gmail.com>
* Dispatcher middlewares
* Redirect and BasicAuth dispatchers
* Remove HTTPBasicAuth and reinstate trust_env logic
* Call resolve dispatcher correctly
* Fix redirection tests
* Add basic and custom auth dispatchers
* Reinstate extracting cookies from response
* Fix linting
* Refactor middleware interface
2019-09-01 23:01:14 +02:00
Florimond Manca
a46462764e
Tighten up response.next() ( #297 )
2019-08-31 09:09:35 -05:00
Florimond Manca
3674058ff7
Parametrize tests with concurrency backend ( #273 )
...
* Parametrize tests with concurrency backend
* Refactor server restart
* Add no-backend test
2019-08-25 20:25:18 +02:00
Tammo Behrends
bebedcbd5d
Explicitly check is_redirect in simple test case ( #208 )
2019-08-14 06:22:12 -05:00
Yeray Diaz Diaz
95dad247b5
Remove "Host" header on redirects if URL origin has changed ( #199 )
...
Fixes #198
* Reinstate accidentally removed return statement
2019-08-13 06:44:23 -05:00
Tom Christie
2d09d5b36c
Renaming -> httpx ( #129 )
...
* Renaming -> httpx
* Renaming to httpx
2019-07-19 15:15:16 +01:00
Seth Michael Larson
c1044cab84
Start using flake8, fix lint issues ( #126 )
2019-07-18 11:41:50 +01:00
Tom Christie
6a44b05e4d
Multipart support ( #90 )
...
* Multipart support
* Test compat with 3.6
2019-06-17 14:38:24 +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
Tom Christie
0cbf3c7581
Sync or Async dispatch ( #83 )
...
* Support thread-pooled dispatch
* Add ConcurrencyBackend.run
* Initial work towards support byte-iterators on sync request data
* Test case for byte iterator content
* byte iterator support for RequestData
* Add BaseResponse
* Bridge sync/async data in SyncResponse
* Add BaseClient
* SyncResponse -> Response
* Tweaking type annotation
* Distinct classes for Request, AsyncRequest
* Tweak is_streaming, content in BaseRequest
* Stream handling moves to client
* Handle mediating to AsyncResponse from a standard sync Dispatcher class
* Working on thread-pooled dispatcher
* Support threaded dispatch, inc. streaming requests/responses
* Increase test coverage
* Coverage and tweaks
* Include Accept and User-Agent headers by default
2019-06-10 12:26:03 +01:00
Tom Christie
95740415db
Work on bringing API into parity with requests. ( #76 )
...
* Finesse timeout argument.
* Drop unused imports
* Add 'cert' and 'verify' arguments
2019-05-23 16:21:00 +01:00
Tom Christie
2116d44777
Add response.json()
2019-05-17 14:29:36 +01:00
Tom Christie
e40b0bfe83
Tidy up redirect tests
2019-05-14 14:34:43 +01:00
Tom Christie
3b4439039d
Use stdlib status codes
2019-05-13 14:34:24 +01:00
Tom Christie
8627b62863
Switch to sync-by-default
2019-05-13 13:48:08 +01:00
Tom Christie
d6628ca88a
Drop 'adapters'
2019-05-13 11:54:51 +01:00