class Response: (source)
Undocumented
Method | __getstate__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __setstate__ |
Undocumented |
Async Method | aclose |
Close the response and release the connection. Automatically called if the response body is read to completion. |
Async Method | aiter |
A byte-iterator over the decoded response content. This allows us to handle gzip, deflate, and brotli encoded responses. |
Async Method | aiter |
Undocumented |
Async Method | aiter |
A byte-iterator over the raw response content. |
Async Method | aiter |
A str-iterator over the decoded response content that handles both gzip, deflate, etc but also detects the content's string encoding. |
Async Method | aread |
Read and return the response content. |
Method | close |
Close the response and release the connection. Automatically called if the response body is read to completion. |
Method | elapsed |
Undocumented |
Method | encoding |
Undocumented |
Method | iter |
A byte-iterator over the decoded response content. This allows us to handle gzip, deflate, and brotli encoded responses. |
Method | iter |
Undocumented |
Method | iter |
A byte-iterator over the raw response content. |
Method | iter |
A str-iterator over the decoded response content that handles both gzip, deflate, etc but also detects the content's string encoding. |
Method | json |
Undocumented |
Method | raise |
Raise the `HTTPStatusError` if one occurred. |
Method | read |
Read and return the response content. |
Method | request |
Undocumented |
Instance Variable | default |
Undocumented |
Instance Variable | extensions |
Undocumented |
Instance Variable | headers |
Undocumented |
Instance Variable | history |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | is |
Undocumented |
Instance Variable | next |
Undocumented |
Instance Variable | status |
Undocumented |
Instance Variable | stream |
Undocumented |
Property | charset |
Return the encoding, as specified by the Content-Type header. |
Property | content |
Undocumented |
Property | cookies |
Undocumented |
Property | elapsed |
Returns the time taken for the complete request/response cycle to complete. |
Property | encoding |
Return an encoding to use for decoding the byte content into text. The priority for determining this is given by... |
Property | has |
Returns True for 3xx responses with a properly formed URL redirection, `False` otherwise. |
Property | http |
Undocumented |
Property | is |
A property which is `True` for 4xx status codes, `False` otherwise. |
Property | is |
A property which is `True` for 4xx and 5xx status codes, `False` otherwise. |
Property | is |
A property which is `True` for 1xx status codes, `False` otherwise. |
Property | is |
A property which is `True` for 3xx status codes, `False` otherwise. |
Property | is |
A property which is `True` for 5xx status codes, `False` otherwise. |
Property | is |
A property which is `True` for 2xx status codes, `False` otherwise. |
Property | links |
Returns the parsed header links of the response, if any |
Property | num |
Undocumented |
Property | reason |
Undocumented |
Property | request |
Returns the request instance associated to the current response. |
Property | text |
Undocumented |
Property | url |
Returns the URL for which the request was made. |
Method | _get |
Returns a decoder instance which can be used to decode the raw byte content, depending on the Content-Encoding used in the response. |
Method | _prepare |
Undocumented |
Instance Variable | _content |
Undocumented |
Instance Variable | _decoder |
Undocumented |
Instance Variable | _elapsed |
Undocumented |
Instance Variable | _encoding |
Undocumented |
Instance Variable | _num |
Undocumented |
Instance Variable | _request |
Undocumented |
Undocumented
Parameters | |
statusint | Undocumented |
headers:typing.Optional[ | Undocumented |
content:typing.Optional[ | Undocumented |
text:typing.Optional[ | Undocumented |
html:typing.Optional[ | Undocumented |
json:typing.Any | Undocumented |
stream:typing.Union[ | Undocumented |
request:typing.Optional[ | Undocumented |
extensions:typing.Optional[ | Undocumented |
history:typing.Optional[ | Undocumented |
defaulttyping.Union[ | Undocumented |
Close the response and release the connection. Automatically called if the response body is read to completion.
A byte-iterator over the decoded response content. This allows us to handle gzip, deflate, and brotli encoded responses.
Parameters | |
chunktyping.Optional[ | Undocumented |
Returns | |
typing.AsyncIterator[ | Undocumented |
A byte-iterator over the raw response content.
Parameters | |
chunktyping.Optional[ | Undocumented |
Returns | |
typing.AsyncIterator[ | Undocumented |
A str-iterator over the decoded response content that handles both gzip, deflate, etc but also detects the content's string encoding.
Parameters | |
chunktyping.Optional[ | Undocumented |
Returns | |
typing.AsyncIterator[ | Undocumented |
Close the response and release the connection. Automatically called if the response body is read to completion.
A byte-iterator over the decoded response content. This allows us to handle gzip, deflate, and brotli encoded responses.
Parameters | |
chunktyping.Optional[ | Undocumented |
Returns | |
typing.Iterator[ | Undocumented |
A byte-iterator over the raw response content.
Parameters | |
chunktyping.Optional[ | Undocumented |
Returns | |
typing.Iterator[ | Undocumented |
A str-iterator over the decoded response content that handles both gzip, deflate, etc but also detects the content's string encoding.
Parameters | |
chunktyping.Optional[ | Undocumented |
Returns | |
typing.Iterator[ | Undocumented |
Return an encoding to use for decoding the byte content into text. The priority for determining this is given by... * `.encoding = <>` has been set explicitly. * The encoding as specified by the charset parameter in the Content-Type header. * The encoding as determined by `default_encoding`, which may either be a string like "utf-8" indicating the encoding to use, or may be a callable which enables charset autodetection.
A property which is `True` for 3xx status codes, `False` otherwise. Note that not all responses with a 3xx status code indicate a URL redirect. Use `response.has_redirect_location` to determine responses with a properly formed URL redirection.
Returns a decoder instance which can be used to decode the raw byte content, depending on the Content-Encoding used in the response.
Returns | |
ContentDecoder | Undocumented |