Urllib3#

Classes:

PoolManager([num_pools, headers, ...])

A drop-in replacement for urllib3.PoolManager that uses Junction for endpoint discovery and load-balancing.

class junction.urllib3.PoolManager(
num_pools: int = 10,
headers: Mapping[str, str] | None = None,
default_routes: List[Route] | None = None,
default_backends: List[Backend] | None = None,
junction_client: Junction | None = None,
**kwargs: Any,
)[source]#

A drop-in replacement for urllib3.PoolManager that uses Junction for endpoint discovery and load-balancing.

Methods:

urlopen(method, url[, redirect])

Same as urllib3.HTTPConnectionPool.urlopen() with custom cross-host redirect logic and only sends the request-uri portion of the url.

urlopen(
method: str,
url: str,
redirect: bool = True,
**kw: Any,
) BaseHTTPResponse[source]#

Same as urllib3.HTTPConnectionPool.urlopen() with custom cross-host redirect logic and only sends the request-uri portion of the url.

The given url parameter must be absolute, such that an appropriate urllib3.connectionpool.ConnectionPool can be chosen for it.