class NTLMConnectionPool(HTTPSConnectionPool): (source)
Implements an NTLM authentication version of an urllib3 connection pool
Method | __init__ |
authurl is a random URL on the server that is protected by NTLM. user is the Windows user, probably in the DOMAIN\username format. pw is the password for the user. |
Method | urlopen |
Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. |
Class Variable | scheme |
Undocumented |
Instance Variable | authurl |
Undocumented |
Instance Variable | domain |
Undocumented |
Instance Variable | pw |
Undocumented |
Instance Variable | rawuser |
Undocumented |
Instance Variable | user |
Undocumented |
Method | _new |
Return a fresh :class:`http.client.HTTPSConnection`. |
Inherited from HTTPSConnectionPool
:
Instance Variable | assert |
Undocumented |
Instance Variable | assert |
Undocumented |
Instance Variable | ca |
Undocumented |
Instance Variable | ca |
Undocumented |
Instance Variable | cert |
Undocumented |
Instance Variable | cert |
Undocumented |
Instance Variable | key |
Undocumented |
Instance Variable | key |
Undocumented |
Instance Variable | ssl |
Undocumented |
Method | _prepare |
Prepare the ``connection`` for :meth:`urllib3.util.ssl_wrap_socket` and establish the tunnel if proxy is used. |
Method | _prepare |
Establishes a tunnel connection through HTTP CONNECT. |
Method | _validate |
Called right before a request is made, after the socket is created. |
Inherited from HTTPConnectionPool
(via HTTPSConnectionPool
):
Method | close |
Close all pooled connections and disable the pool. |
Method | is |
Check if the given ``url`` is a member of the same host as this connection pool. |
Instance Variable | block |
Undocumented |
Instance Variable | conn |
Undocumented |
Instance Variable | num |
Undocumented |
Instance Variable | num |
Undocumented |
Instance Variable | pool |
Undocumented |
Instance Variable | proxy |
Undocumented |
Instance Variable | proxy |
Undocumented |
Instance Variable | proxy |
Undocumented |
Instance Variable | retries |
Undocumented |
Instance Variable | strict |
Undocumented |
Instance Variable | timeout |
Undocumented |
Method | _absolute |
Undocumented |
Method | _get |
Get a connection. Will return a pooled connection if one is available. |
Method | _get |
Helper that always returns a :class:`urllib3.util.Timeout` |
Method | _make |
Perform a request on a given urllib connection object taken from our pool. |
Method | _put |
Put a connection back into the pool. |
Method | _raise |
Is the error actually a timeout? Will raise a ReadTimeout or pass |
Inherited from ConnectionPool
(via HTTPSConnectionPool
, HTTPConnectionPool
):
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | __str__ |
Undocumented |
Instance Variable | host |
Undocumented |
Instance Variable | port |
Undocumented |
Instance Variable | _proxy |
Undocumented |
Inherited from RequestMethods
(via HTTPSConnectionPool
, HTTPConnectionPool
, ConnectionPool
):
Method | request |
Make a request using :meth:`urlopen` with the appropriate encoding of ``fields`` based on the ``method`` used. |
Method | request |
Make a request using :meth:`urlopen` with the ``fields`` encoded in the body. This is useful for request methods like POST, PUT, PATCH, etc. |
Method | request |
Make a request using :meth:`urlopen` with the ``fields`` encoded in the url. This is useful for request methods like GET, HEAD, DELETE, etc. |
Instance Variable | headers |
Undocumented |
Class Variable | _encode |
Undocumented |
urllib3.HTTPSConnectionPool.__init__
authurl is a random URL on the server that is protected by NTLM. user is the Windows user, probably in the DOMAIN\username format. pw is the password for the user.
urllib3.HTTPConnectionPool.urlopen
Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method provided by :class:`.RequestMethods`, such as :meth:`request`. .. note:: `release_conn` will only behave as expected if `preload_content=False` because we want to make `preload_content=False` the default behaviour someday soon without breaking backwards compatibility. :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param redirect: If True, automatically handle redirects (status codes 301, 302, 303, 307, 308). Each redirect counts as a retry. Disabling retries will disable redirect, too. :param assert_same_host: If ``True``, will make sure that the host of the pool requests is consistent else will raise HostChangedError. When ``False``, you can use the pool on an HTTP proxy and request foreign hosts. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param pool_timeout: If set and the pool is set to block=True, then this method will block for ``pool_timeout`` seconds and raise EmptyPoolError if no connection is available within the time period. :param release_conn: If False, then the urlopen call will not release the connection back into the pool once a response is received (but will release if you read the entire contents of the response such as when `preload_content=True`). This is useful if you're not preloading the response's content immediately. You will need to call ``r.release_conn()`` on the response ``r`` to return the connection back into the pool. If None, it takes the value of ``response_kw.get('preload_content', True)``. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param int body_pos: Position to seek to in file-like body in the event of a retry or redirect. Typically this won't need to be set because urllib3 will auto-populate the value when needed. :param \**response_kw: Additional parameters are passed to :meth:`urllib3.response.HTTPResponse.from_httplib`
urllib3.HTTPSConnectionPool._new_conn
Return a fresh :class:`http.client.HTTPSConnection`.