Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
0.11.0 (September 22nd, 2020)
The Transport API with 0.11.0 has a couple of significant changes.
Firstly we've moved changed the request interface in order to allow extensions, which will later enable us to support features
such as trailing headers, HTTP/2 server push, and CONNECT/Upgrade connections.
The interface changes from:
To instead including an optional dictionary of extensions on the request and response:
Having an open-ended extensions point will allow us to add later support for various optional features, that wouldn't otherwise be supported without these API changes.
In particular:
Currently extensions are limited to:
timeout
- Optional. Timeout dictionary.http_version
- Optional. Include the HTTP version used on the response.reason
- Optional. Include the reason phrase used on the response. Only valid with HTTP/1.*.See encode/httpx#1274 (comment) for the history behind this.
Secondly, the async version of
request
is now namespaced asarequest
.This allows concrete transports to support both sync and async implementations on the same class.
Added
backend="anyio"
. (Pull Added AnyIO support #169)Changed
.request
and.arequest
so implementations can support both sync and async. (Pull Use.arequest
for the async version of the API. #189)