Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/urllib3/urllib3
/ functions
Functions
1,476 in github.com/urllib3/urllib3
⨍
Functions
1,476
◇
Types & classes
218
↳
Endpoints
57
↓ 247 callers
Method
request
()
test/with_dummyserver/test_socketlevel.py:1383
↓ 76 callers
Method
_start_server
(self)
dummyserver/socketserver.py:121
↓ 64 callers
Method
get
(self, n: int)
src/urllib3/response.py:255
↓ 45 callers
Function
proxy_from_url
(url: str, **kw: typing.Any)
src/urllib3/poolmanager.py:636
↓ 43 callers
Method
close
(self)
test/with_dummyserver/test_socketlevel.py:1506
↓ 42 callers
Method
urlopen
Same as :meth:`urllib3.HTTPConnectionPool.urlopen` with custom cross-host redirect logic and only sends the request-uri porti
src/urllib3/poolmanager.py:409
↓ 37 callers
Method
tls_version
(self)
test/with_dummyserver/test_https.py:74
↓ 35 callers
Method
_get_conn
Get a connection. Will return a pooled connection if one is available. If no connections are available and :prop:`.block` is ``False
src/urllib3/connectionpool.py:258
↓ 33 callers
Function
parse_url
Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is performed to parse incomplete urls. Fields not provided will be None.
src/urllib3/util/url.py:369
↓ 31 callers
Method
recv
(self, buflen: int = 1024, flags: int = 0)
src/urllib3/util/ssltransport.py:84
↓ 29 callers
Method
send
(self, data: bytes)
src/urllib3/http2.py:116
↓ 28 callers
Method
read
(self, amt: int = -1)
test/test_response.py:1625
↓ 24 callers
Method
json
Deserializes the body of the HTTP response as a Python object. The body of the HTTP response must be encoded using UTF-8, as per
src/urllib3/response.py:366
↓ 24 callers
Method
sendall
(self, data: bytes, flags: int = 0)
src/urllib3/util/ssltransport.py:101
↓ 23 callers
Method
read
Similar to :meth:`http.client.HTTPResponse.read`, but with two additional parameters: ``decode_content`` and ``cache_content``.
src/urllib3/response.py:910
↓ 22 callers
Method
increment
Return a new Retry object with incremented retry counters. :param response: A response object, or None, if the server did not ret
src/urllib3/util/retry.py:428
↓ 22 callers
Method
items
(self)
src/urllib3/_collections.py:448
↓ 21 callers
Method
connection_from_url
Similar to :func:`urllib3.connectionpool.connection_from_url`. If ``pool_kwargs`` is not provided and a new pool needs to be
src/urllib3/poolmanager.py:356
↓ 19 callers
Method
pop
(self)
test/__init__.py:338
↓ 19 callers
Function
pyodide_test
(selenium_coverage, host: str, port: int)
test/contrib/emscripten/test_emscripten.py:47
↓ 18 callers
Method
add
Adds a (name, value) pair, doesn't overwrite the value if it already exists. If this is called with combine=True, instead of adding a
src/urllib3/_collections.py:302
↓ 17 callers
Method
close
(self)
test/test_response.py:1635
↓ 16 callers
Method
_new_conn
Establish a socket connection and set nodelay settings on it. :return: New socket connection.
src/urllib3/connection.py:190
↓ 16 callers
Method
stream
A generator wrapper for the read() method. A call will block until ``amt`` bytes have been read from the connection or until the
src/urllib3/response.py:1038
↓ 14 callers
Function
_match_hostname
( cert: _TYPE_PEER_CERT_RET_DICT | None, asserted_hostname: str, hostname_checks_common_name: bool
src/urllib3/connection.py:856
↓ 14 callers
Method
_put_conn
Put a connection back into the pool. :param conn: Connection object for the current host and port as returned by
src/urllib3/connectionpool.py:296
↓ 14 callers
Method
copy
(self)
src/urllib3/_collections.py:430
↓ 14 callers
Method
extend
Generic import function for any type of header-like object. Adapted version of MutableMapping.update in order to insert items with sel
src/urllib3/_collections.py:337
↓ 14 callers
Method
flush
(self)
test/test_response.py:1631
↓ 14 callers
Method
keys
(self)
test/test_collections.py:140
↓ 13 callers
Function
consume_socket
( sock: SSLTransport | socket.socket, chunks: int = 65536, quit_event: threading.Event | None = No
dummyserver/testcase.py:22
↓ 12 callers
Method
getlist
(self, key: str)
src/urllib3/_collections.py:371
↓ 12 callers
Function
request
A convenience, top-level request method. It uses a module-global ``PoolManager`` instance. Therefore, its side effects could be shared across
src/urllib3/__init__.py:117
↓ 12 callers
Method
wrap_socket
( self, sock: socket_cls, server_side: bool = False, do_handshake_on_connect:
src/urllib3/contrib/pyopenssl.py:484
↓ 11 callers
Method
connect
(self, scope: HTTPScope, send: ASGISendCallable)
dummyserver/asgi_proxy.py:87
↓ 11 callers
Method
connection_from_host
Get a :class:`urllib3.connectionpool.ConnectionPool` based on the host, port, and scheme. If ``port`` isn't given, it will be derive
src/urllib3/poolmanager.py:276
↓ 11 callers
Function
connection_from_url
Given a url, return an :class:`.ConnectionPool` instance of its host. This is a shortcut for not having to parse out the scheme, host, and p
src/urllib3/connectionpool.py:1110
↓ 11 callers
Method
put
(self, data: bytes)
src/urllib3/response.py:251
↓ 11 callers
Method
read_chunked
Similar to :meth:`HTTPResponse.read`, but with an additional parameter: ``decode_content``. :param amt: How much
src/urllib3/response.py:1160
↓ 11 callers
Method
run
(self)
dummyserver/socketserver.py:142
↓ 11 callers
Method
settimeout
(self, value: float | None)
src/urllib3/util/ssltransport.py:205
↓ 10 callers
Method
__init__
(self, pool: ConnectionPool, message: str)
src/urllib3/exceptions.py:34
↓ 10 callers
Method
getresponse
( # type: ignore[override] self, )
src/urllib3/http2.py:121
↓ 10 callers
Method
install
(self)
test/__init__.py:253
↓ 10 callers
Function
is_fp_closed
Checks whether a given file-like object is closed. :param obj: The file-like object to check.
src/urllib3/util/response.py:9
↓ 10 callers
Method
is_same_host
Check if the given ``url`` is a member of the same host as this connection pool.
src/urllib3/connectionpool.py:572
↓ 10 callers
Function
sample_request
(binary: typing.Literal[True] = ...)
test/test_ssltransport.py:35
↓ 10 callers
Function
ssl_wrap_socket
( sock: socket.socket, keyfile: str | None = ..., certfile: str | None = ..., cert_reqs: int |
src/urllib3/util/ssl_.py:355
↓ 9 callers
Method
_make_request
Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of
src/urllib3/connectionpool.py:379
↓ 9 callers
Function
encode_multipart_formdata
Encode a dictionary of ``fields`` using the multipart/form-data MIME format. :param fields: Dictionary of fields or list of (key, :c
src/urllib3/filepost.py:51
↓ 9 callers
Method
start_chunked_handler
(self)
test/with_dummyserver/test_chunked_transfer.py:18
↓ 9 callers
Function
validate_response
( provided_response: bytes | bytearray | str, binary: bool = True )
test/test_ssltransport.py:82
↓ 8 callers
Method
load_cert_chain
( self, certfile: str, keyfile: str | None = None, password: str | None = None
src/urllib3/contrib/pyopenssl.py:464
↓ 8 callers
Method
load_verify_locations
( self, cafile: str | None = None, capath: str | None = None, cadata: bytes |
src/urllib3/contrib/pyopenssl.py:447
↓ 8 callers
Method
read1
Similar to ``http.client.HTTPResponse.read1`` and documented in :meth:`io.BufferedReader.read1`, but with an additional parameter:
src/urllib3/response.py:984
↓ 8 callers
Method
run_webworker
(self, code: str)
test/contrib/emscripten/conftest.py:113
↓ 8 callers
Method
sleep
Sleep between retry attempts. This method will respect a server's ``Retry-After`` response header and sleep the duration of the time
src/urllib3/util/retry.py:349
↓ 8 callers
Method
start_response_handler
( cls, response: bytes, num: int = 1, block_send: threading.Event | None = Non
dummyserver/testcase.py:87
↓ 7 callers
Method
_get_header_lines
(self, prefix: bytes)
test/with_dummyserver/test_chunked_transfer.py:93
↓ 7 callers
Method
clear
Empty our store of pools and direct them all to close. This will not affect in-flight connections, but they will not be re-u
src/urllib3/poolmanager.py:267
↓ 7 callers
Method
decompress
(self, data: bytes)
src/urllib3/response.py:121
↓ 7 callers
Method
flush
(self)
src/urllib3/response.py:142
↓ 7 callers
Method
isclosed
(self)
src/urllib3/response.py:668
↓ 7 callers
Function
run_server_in_thread
( scheme: str, host: str, tmpdir: Path, ca: trustme.CA, server_cert: trustme.LeafCert )
test/conftest.py:77
↓ 7 callers
Method
stream
()
test/test_response.py:1246
↓ 7 callers
Function
to_str
( x: str | bytes, encoding: str | None = None, errors: str | None = None )
src/urllib3/util/util.py:19
↓ 6 callers
Method
close
(self)
src/urllib3/response.py:1069
↓ 6 callers
Function
connection_requires_http_tunnel
Returns True if the connection requires an HTTP CONNECT through the proxy. :param URL proxy_url: URL of the proxy. :param ProxyC
src/urllib3/util/proxy.py:11
↓ 6 callers
Function
create_connection
Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the so
src/urllib3/util/connection.py:27
↓ 6 callers
Method
get_backoff_time
Formula for computing the current backoff :rtype: float
src/urllib3/util/retry.py:289
↓ 6 callers
Method
new
(self, **kw: typing.Any)
src/urllib3/util/retry.py:247
↓ 6 callers
Method
release_conn
(self)
src/urllib3/response.py:635
↓ 6 callers
Method
request
( # type: ignore[override] self, method: str, url: str, body: _TYPE_BODY | No
src/urllib3/connection.py:322
↓ 6 callers
Method
start_dummy_server
( self, handler: typing.Callable[[socket.socket], None] | None = None, validate: bool
test/test_ssltransport.py:111
↓ 5 callers
Method
_merge_pool_kwargs
Merge a dictionary of override values for self.connection_pool_kw. This does not modify self.connection_pool_kw and returns a new di
src/urllib3/poolmanager.py:374
↓ 5 callers
Method
_test_body
(self, data: bytes | str | None)
test/with_dummyserver/test_chunked_transfer.py:60
↓ 5 callers
Method
close
(self)
src/urllib3/http2.py:214
↓ 5 callers
Method
close
Close all pooled connections and disable the pool.
src/urllib3/connectionpool.py:110
↓ 5 callers
Method
get_all
(self)
src/urllib3/response.py:285
↓ 5 callers
Method
gettimeout
(self)
src/urllib3/util/ssltransport.py:208
↓ 5 callers
Method
is_exhausted
Are we out of retries?
src/urllib3/util/retry.py:409
↓ 5 callers
Method
makefile
(cls, *args: typing.Any, **kwargs: typing.Any)
test/test_response.py:1672
↓ 5 callers
Function
original_ssl_wrap_socket
( sock: socket.socket, keyfile: StrOrBytesPath | None = None, certfile: StrOrBytesPath | None = No
test/with_dummyserver/test_socketlevel.py:137
↓ 5 callers
Method
request_encode_url
Make a request using :meth:`urlopen` with the ``fields`` encoded in the url. This is useful for request methods like GET, HEAD, DELET
src/urllib3/_request_methods.py:148
↓ 5 callers
Function
resolve_cert_reqs
Resolves the argument to a numeric constant, which can be passed to the wrap_socket function/method from the ssl module. Defaults to :dat
src/urllib3/util/ssl_.py:177
↓ 5 callers
Function
rewind_body
Attempt to rewind body to a certain position. Primarily used for request redirects and retries. :param body: File-like object th
src/urllib3/util/request.py:154
↓ 5 callers
Function
run_hypercorn_in_thread
( config: hypercorn.Config, app: hypercorn.typing.ASGIFramework )
dummyserver/hypercornserver.py:44
↓ 5 callers
Method
set_tunnel
( self, host: str, port: int | None = None, headers: typing.Mapping[str, str]
src/urllib3/connection.py:221
↓ 5 callers
Method
start_basic_handler
( cls, num: int = 1, block_send: threading.Event | None = None )
dummyserver/testcase.py:126
↓ 5 callers
Method
start_destination_server
Socket handler for the destination_server. Terminates the second TLS layer and send a basic HTTP response.
test/test_ssltransport.py:373
↓ 5 callers
Method
start_proxy_server
(cls)
test/test_ssltransport.py:360
↓ 5 callers
Method
tell
Obtain the number of bytes pulled over the wire so far. May differ from the amount of content returned by :meth:``urllib3.response.HT
src/urllib3/response.py:671
↓ 5 callers
Method
version
(self)
src/urllib3/util/ssltransport.py:187
↓ 4 callers
Function
_encode_invalid_chars
( component: str, allowed_chars: typing.Container[str] )
src/urllib3/util/url.py:214
↓ 4 callers
Function
_get_default_user_agent
()
src/urllib3/connection.py:907
↓ 4 callers
Function
_has_ipv6
Returns True if the system can bind an IPv6 address.
src/urllib3/util/connection.py:114
↓ 4 callers
Function
_obj_from_dict
(dict_val: dict[str, Any])
src/urllib3/contrib/emscripten/fetch.py:88
↓ 4 callers
Method
_ssl_io_loop
(self, func: typing.Callable[[], None])
src/urllib3/util/ssltransport.py:225
↓ 4 callers
Function
assert_is_verified
(pm: ProxyManager, *, proxy: bool, target: bool)
test/with_dummyserver/test_proxy_poolmanager.py:46
↓ 4 callers
Method
connection_from_context
Get a :class:`urllib3.connectionpool.ConnectionPool` based on the request context. ``request_context`` must at least contain the ``s
src/urllib3/poolmanager.py:305
next →
1–100 of 1,476, ranked by callers