Skip to content
Myr

Add 'http2' for Client (#982)

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

authored by Tom Christie · committed by GitHub · parent ebc9c29 · Browse files · 1 file+7 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

1 file+7 added−0 removed

  • other:+7 added−0 removed

1 file+7 added−0 removed

modified:httpx/_client.py+7 added
434 unmodified lines
435 headers: HeaderTypes = None,436 cookies: CookieTypes = None,437 verify: VerifyTypes = True,438 cert: CertTypes = None,439 http2: bool = False,440 proxies: ProxiesTypes = None,441 timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG,442 pool_limits: PoolLimits = DEFAULT_POOL_LIMITS,443 max_redirects: int = DEFAULT_MAX_REDIRECTS,
26 unmodified lines
470471 self.transport = self.init_transport(472 verify=verify,473 cert=cert,474 http2=http2,475 pool_limits=pool_limits,476 transport=transport,477 app=app,478 trust_env=trust_env,
2 unmodified lines
481 key: self.init_proxy_transport(482 proxy,483 verify=verify,484 cert=cert,485 http2=http2,486 pool_limits=pool_limits,487 trust_env=trust_env,488 )489 for key, proxy in proxy_map.items()
2 unmodified lines
492 def init_transport(493 self,494 verify: VerifyTypes = True,495 cert: CertTypes = None,496 http2: bool = False,497 pool_limits: PoolLimits = DEFAULT_POOL_LIMITS,498 transport: httpcore.SyncHTTPTransport = None,499 app: typing.Callable = None,500 trust_env: bool = True,
11 unmodified lines
512 return httpcore.SyncConnectionPool(513 ssl_context=ssl_context,514 max_keepalive=pool_limits.max_keepalive,515 max_connections=pool_limits.max_connections,516 http2=http2,517 )518519 def init_proxy_transport(520 self,521 proxy: Proxy,522 verify: VerifyTypes = True,523 cert: CertTypes = None,524 http2: bool = False,525 pool_limits: PoolLimits = DEFAULT_POOL_LIMITS,526 trust_env: bool = True,527 ) -> httpcore.SyncHTTPTransport:528 ssl_context = SSLConfig(
6 unmodified lines
535 proxy_mode=proxy.mode,536 ssl_context=ssl_context,537 max_keepalive=pool_limits.max_keepalive,538 max_connections=pool_limits.max_connections,539 http2=http2,540 )541542 def transport_for_url(self, url: URL) -> httpcore.SyncHTTPTransport:543 """
990 unmodified lines