Undocumented
Module | _api |
Undocumented |
Module | _auth |
No module docstring; 1/2 class documented |
Module | _client |
No module docstring; 0/1 variable, 0/4 constant, 3/5 classes documented |
Module | _compat |
The _compat module is used for code which requires branching between different Python environments. It is excluded from the code coverage checks. |
Module | _config |
No module docstring; 0/1 variable, 0/5 constant, 1/2 class documented |
Module | _content |
No module docstring; 2/8 functions, 1/3 class documented |
Module | _decoders |
Handlers for Content-Encoding. |
Module | _exceptions |
Our exception hierarchy: |
Module | _main |
Undocumented |
Module | _models |
Undocumented |
Module | _multipart |
No module docstring; 3/3 classes documented |
Module | _status_codes |
Undocumented |
Package | _transports |
No package docstring; 1/5 module documented |
Module | _types |
Type definitions for type checking purposes. |
Module | _utils |
No module docstring; 0/3 variable, 0/5 constant, 10/19 functions, 1/4 class documented |
From __init__.py
:
Class | ASGITransport |
A custom AsyncTransport that handles sending requests directly to an ASGI app. The simplest way to use this functionality is to use the app argument. |
Class | AsyncBaseTransport |
Undocumented |
Class | AsyncByteStream |
Undocumented |
Class | AsyncClient |
An asynchronous HTTP client, with connection pooling, HTTP/2, redirects, cookie persistence, etc. |
Class | AsyncHTTPTransport |
Undocumented |
Class | Auth |
Base class for all authentication schemes. |
Class | BaseTransport |
No class docstring; 1/4 method documented |
Class | BasicAuth |
Allows the 'auth' argument to be passed as a (username, password) pair, and uses HTTP Basic authentication. |
Class | ByteStream |
Undocumented |
Class | Client |
An HTTP client, with connection pooling, HTTP/2, redirects, cookie persistence, etc. |
Class | CloseError |
Failed to close a connection. |
Class | codes |
HTTP status codes and reason phrases |
Class | ConnectError |
Failed to establish a connection. |
Class | ConnectTimeout |
Timed out while connecting to the host. |
Class | CookieConflict |
Attempted to lookup a cookie by name, but multiple cookies existed. |
Class | Cookies |
HTTP Cookies, as a mutable mapping. |
Class | DecodingError |
Decoding of the response failed, due to a malformed encoding. |
Class | DigestAuth |
No class docstring; 0/2 instance variable, 0/1 constant, 1/7 method documented |
Class | Headers |
HTTP headers, as a case-insensitive multi-dict. |
Class | HTTPError |
Base class for RequestError and HTTPStatusError . |
Class | HTTPStatusError |
The response had an error HTTP status of 4xx or 5xx. |
Class | HTTPTransport |
Undocumented |
Class | InvalidURL |
URL is improperly formed or cannot be parsed. |
Class | Limits |
Configuration for limits to various client behaviors. |
Class | LocalProtocolError |
A protocol was violated by the client. |
Class | MockTransport |
Undocumented |
Class | NetworkError |
The base class for network-related errors. |
Class | PoolTimeout |
Timed out waiting to acquire a connection from the pool. |
Class | ProtocolError |
The protocol was violated. |
Class | Proxy |
Undocumented |
Class | ProxyError |
An error occurred while establishing a proxy connection. |
Class | QueryParams |
URL query parameters, as a multi-dict. |
Class | ReadError |
Failed to receive data from the network. |
Class | ReadTimeout |
Timed out while receiving data from the host. |
Class | RemoteProtocolError |
The protocol was violated by the server. |
Class | Request |
No class docstring; 0/1 property, 0/6 instance variable, 2/7 methods documented |
Class | RequestError |
Base class for all exceptions that may occur when issuing a .request() . |
Class | RequestNotRead |
Attempted to access streaming request content, without having called read() . |
Class | Response |
No class docstring; 14/20 properties, 0/14 instance variable, 12/23 methods documented |
Class | ResponseNotRead |
Attempted to access streaming response content, without having called read() . |
Class | StreamClosed |
Attempted to read or stream response content, but the request has been closed. |
Class | StreamConsumed |
Attempted to read or stream content, but the content has already been streamed. |
Class | StreamError |
The base class for stream exceptions. |
Class | SyncByteStream |
No class docstring; 2/3 methods documented |
Class | Timeout |
Timeout configuration. |
Class | TimeoutException |
The base class for timeout errors. |
Class | TooManyRedirects |
Too many redirects. |
Class | TransportError |
Base class for all exceptions that occur at the level of the Transport API. |
Class | UnsupportedProtocol |
Attempted to make a request to an unsupported protocol. |
Class | URL |
url = httpx.URL("HTTPS://jo%40email.com:a%20secret@müller.de:1234/pa%20th?search=ab#anchorlink") |
Class | WriteError |
Failed to send data through the network. |
Class | WriteTimeout |
Timed out while sending data to the host. |
Class | WSGITransport |
A custom transport that handles sending requests directly to an WSGI app. The simplest way to use this functionality is to use the app argument. |
Function | create_ssl_context |
Undocumented |
Function | delete |
Sends a DELETE request. |
Function | get |
Sends a GET request. |
Function | head |
Sends a HEAD request. |
Function | main |
Undocumented |
Function | options |
Sends an OPTIONS request. |
Function | patch |
Sends a PATCH request. |
Function | post |
Sends a POST request. |
Function | put |
Sends a PUT request. |
Function | request |
Sends an HTTP request. |
Function | stream |
Alternative to httpx.request() that streams the response body instead of loading it into memory at once. |
Constant | USE_CLIENT_DEFAULT |
Undocumented |
Variable | __description__ |
Undocumented |
Variable | __title__ |
Undocumented |
Variable | __version__ |
Undocumented |
Variable | __locals |
Undocumented |
Sends a DELETE
request.
Parameters: See httpx.request
.
Note that the data
, files
, and json
parameters are not available on
this function, as DELETE
requests should not include a request body.
Parameters | |
url:URLTypes | Undocumented |
params:QueryParamTypes | Undocumented |
headers:HeaderTypes | Undocumented |
cookies:CookieTypes | Undocumented |
auth:AuthTypes | Undocumented |
proxies:ProxiesTypes | Undocumented |
follow_redirects:bool | Undocumented |
cert:CertTypes | Undocumented |
verify:VerifyTypes | Undocumented |
timeout:TimeoutTypes | Undocumented |
trust_env:bool | Undocumented |
Returns | |
Response | Undocumented |
Sends a GET
request.
Parameters: See httpx.request
.
Note that the data
, files
, and json
parameters are not available on
this function, as GET
requests should not include a request body.
Parameters | |
url:URLTypes | Undocumented |
params:QueryParamTypes | Undocumented |
headers:HeaderTypes | Undocumented |
cookies:CookieTypes | Undocumented |
auth:AuthTypes | Undocumented |
proxies:ProxiesTypes | Undocumented |
follow_redirects:bool | Undocumented |
cert:CertTypes | Undocumented |
verify:VerifyTypes | Undocumented |
timeout:TimeoutTypes | Undocumented |
trust_env:bool | Undocumented |
Returns | |
Response | Undocumented |
Sends a HEAD
request.
Parameters: See httpx.request
.
Note that the data
, files
, and json
parameters are not available on
this function, as HEAD
requests should not include a request body.
Parameters | |
url:URLTypes | Undocumented |
params:QueryParamTypes | Undocumented |
headers:HeaderTypes | Undocumented |
cookies:CookieTypes | Undocumented |
auth:AuthTypes | Undocumented |
proxies:ProxiesTypes | Undocumented |
follow_redirects:bool | Undocumented |
cert:CertTypes | Undocumented |
verify:VerifyTypes | Undocumented |
timeout:TimeoutTypes | Undocumented |
trust_env:bool | Undocumented |
Returns | |
Response | Undocumented |
Sends an OPTIONS
request.
Parameters: See httpx.request
.
Note that the data
, files
, and json
parameters are not available on
this function, as OPTIONS
requests should not include a request body.
Parameters | |
url:URLTypes | Undocumented |
params:QueryParamTypes | Undocumented |
headers:HeaderTypes | Undocumented |
cookies:CookieTypes | Undocumented |
auth:AuthTypes | Undocumented |
proxies:ProxiesTypes | Undocumented |
follow_redirects:bool | Undocumented |
cert:CertTypes | Undocumented |
verify:VerifyTypes | Undocumented |
timeout:TimeoutTypes | Undocumented |
trust_env:bool | Undocumented |
Returns | |
Response | Undocumented |
Sends a PATCH
request.
Parameters: See httpx.request
.
Parameters | |
url:URLTypes | Undocumented |
content:RequestContent | Undocumented |
data:RequestData | Undocumented |
files:RequestFiles | Undocumented |
json:typing.Any | Undocumented |
params:QueryParamTypes | Undocumented |
headers:HeaderTypes | Undocumented |
cookies:CookieTypes | Undocumented |
auth:AuthTypes | Undocumented |
proxies:ProxiesTypes | Undocumented |
follow_redirects:bool | Undocumented |
cert:CertTypes | Undocumented |
verify:VerifyTypes | Undocumented |
timeout:TimeoutTypes | Undocumented |
trust_env:bool | Undocumented |
Returns | |
Response | Undocumented |
Sends a POST
request.
Parameters: See httpx.request
.
Parameters | |
url:URLTypes | Undocumented |
content:RequestContent | Undocumented |
data:RequestData | Undocumented |
files:RequestFiles | Undocumented |
json:typing.Any | Undocumented |
params:QueryParamTypes | Undocumented |
headers:HeaderTypes | Undocumented |
cookies:CookieTypes | Undocumented |
auth:AuthTypes | Undocumented |
proxies:ProxiesTypes | Undocumented |
follow_redirects:bool | Undocumented |
cert:CertTypes | Undocumented |
verify:VerifyTypes | Undocumented |
timeout:TimeoutTypes | Undocumented |
trust_env:bool | Undocumented |
Returns | |
Response | Undocumented |
Sends a PUT
request.
Parameters: See httpx.request
.
Parameters | |
url:URLTypes | Undocumented |
content:RequestContent | Undocumented |
data:RequestData | Undocumented |
files:RequestFiles | Undocumented |
json:typing.Any | Undocumented |
params:QueryParamTypes | Undocumented |
headers:HeaderTypes | Undocumented |
cookies:CookieTypes | Undocumented |
auth:AuthTypes | Undocumented |
proxies:ProxiesTypes | Undocumented |
follow_redirects:bool | Undocumented |
cert:CertTypes | Undocumented |
verify:VerifyTypes | Undocumented |
timeout:TimeoutTypes | Undocumented |
trust_env:bool | Undocumented |
Returns | |
Response | Undocumented |
Sends an HTTP request.
Parameters:
Request
object: GET
, OPTIONS
,HEAD
, POST
, PUT
, PATCH
, or DELETE
.
* url - URL for the new Request
object.
* params - (optional) Query parameters to include in the URL, as a
string, dictionary, or sequence of two-tuples.
* content - (optional) Binary content to include in the body of the
request, as bytes or a byte iterator.
* data - (optional) Form data to include in the body of the request,
as a dictionary.
* files - (optional) A dictionary of upload files to include in the
body of the request.
* json - (optional) A JSON serializable object to include in the body
of the request.
* headers - (optional) Dictionary of HTTP headers to include in the
request.
* cookies - (optional) Dictionary of Cookie items to include in the
request.
* auth - (optional) An authentication class to use when sending the
request.
* proxies - (optional) A dictionary mapping proxy keys to proxy URLs.
* timeout - (optional) The timeout configuration to use when sending
the request.
* follow_redirects - (optional) Enables or disables HTTP redirects.
* verify - (optional) SSL certificates (a.k.a CA bundle) used to
verify the identity of requested hosts. Either True
(default CA bundle),
a path to an SSL certificate file, an ssl.SSLContext
, or False
(which will disable verification).
* cert - (optional) An SSL certificate used by the requested host
to authenticate the client. Either a path to an SSL certificate file, or
two-tuple of (certificate file, key file), or a three-tuple of (certificate
file, key file, password).
* trust_env - (optional) Enables or disables usage of environment
variables for configuration.
Returns: Response
Usage:
` >>> import httpx >>> response = httpx.request('GET', 'https://httpbin.org/get') >>> response <Response [200 OK]> `
Parameters | |
method:str | Undocumented |
url:URLTypes | Undocumented |
params:QueryParamTypes | Undocumented |
content:RequestContent | Undocumented |
data:RequestData | Undocumented |
files:RequestFiles | Undocumented |
json:typing.Any | Undocumented |
headers:HeaderTypes | Undocumented |
cookies:CookieTypes | Undocumented |
auth:AuthTypes | Undocumented |
proxies:ProxiesTypes | Undocumented |
timeout:TimeoutTypes | Undocumented |
follow_redirects:bool | Undocumented |
verify:VerifyTypes | Undocumented |
cert:CertTypes | Undocumented |
trust_env:bool | Undocumented |
Returns | |
Response | Undocumented |
Alternative to httpx.request()
that streams the response body
instead of loading it into memory at once.
Parameters: See httpx.request
.
See also: [Streaming Responses][0]
[0]: /quickstart#streaming-responses
Parameters | |
method:str | Undocumented |
url:URLTypes | Undocumented |
params:QueryParamTypes | Undocumented |
content:RequestContent | Undocumented |
data:RequestData | Undocumented |
files:RequestFiles | Undocumented |
json:typing.Any | Undocumented |
headers:HeaderTypes | Undocumented |
cookies:CookieTypes | Undocumented |
auth:AuthTypes | Undocumented |
proxies:ProxiesTypes | Undocumented |
timeout:TimeoutTypes | Undocumented |
follow_redirects:bool | Undocumented |
verify:VerifyTypes | Undocumented |
cert:CertTypes | Undocumented |
trust_env:bool | Undocumented |
Returns | |
typing.Iterator[ | Undocumented |