class documentation
Response object for HTTP requests.
| Method | __init__ |
Initialize the response with the given body. |
| Method | __setattr__ |
Set a response attribute, routing to the matching setter. |
| Method | close |
Close the response and release any resources. |
| Method | json |
Convert the response content to a JSON object. |
| Instance Variable | content |
The raw response body. |
| Instance Variable | encoding |
The character encoding of the response. |
| Instance Variable | headers |
The HTTP headers of the response. |
| Instance Variable | reason |
The HTTP reason phrase. |
| Instance Variable | status |
The HTTP status code of the response. |
| Instance Variable | text |
The response body decoded as a string. |
Set a response attribute, routing to the matching setter.
| Parameters | |
name:str | Attribute name to set. |
value:object | New value for the attribute. |