Skip to content
Myr

HTTPS proxies support (#2845)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* Add ssl_context argument to Proxy class * Changelog

authored by Kar Petrosyan · committed by GitHub · parent adbcd0e · Browse files · 3 files+4 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+4 added−0 removed

  • other:+4 added−0 removed

3 files+4 added−0 removed

modified:httpx/_transports/default.py+1 added
154 unmodified lines
155 ),156 proxy_auth=proxy.raw_auth,157 proxy_headers=proxy.headers.raw,158 ssl_context=ssl_context,159 proxy_ssl_context=proxy.ssl_context,160 max_connections=limits.max_connections,161 max_keepalive_connections=limits.max_keepalive_connections,162 keepalive_expiry=limits.keepalive_expiry,163 http1=http1,
215 unmodified lines
modified:httpx/_config.py+2 added
324 unmodified lines
325 def __init__(326 self,327 url: URLTypes,328 *,329 ssl_context: typing.Optional[ssl.SSLContext] = None,330 auth: typing.Optional[typing.Tuple[str, str]] = None,331 headers: typing.Optional[HeaderTypes] = None,332 ):333 url = URL(url)
9 unmodified lines
343344 self.url = url345 self.auth = auth346 self.headers = headers347 self.ssl_context = ssl_context348349 @property350 def raw_auth(self) -> typing.Optional[typing.Tuple[bytes, bytes]]:351 # The proxy authentication as raw bytes.
20 unmodified lines
modified:CHANGELOG.md+1 added
10 unmodified lines
11* Drop support for Python 3.7. (#2813)1213### Added1415* Support HTTPS proxies. (#2845)16* Change the type of `Extensions` from `Mapping[Str, Any]` to `MutableMapping[Str, Any]`. (#2803)17* Add `socket_options` argument to `httpx.HTTPTransport` and `httpx.AsyncHTTPTransport` classes. (#2716)18* The `Response.raise_for_status()` method now returns the response instance. For example: `data = httpx.get('...').raise_for_status().json()`. (#2776)19
1016 unmodified lines