Response
The response object that is used by default in Flask. Works like the response object from Werkzeug but is set to have an HTML mimetype by default. Quite often you don't have to create this object yourself because :meth:~flask.Flask.make_response will take care of that for you.
Attributes
| Attribute | Type | Description |
|---|---|---|
| default_mimetype | `str | None` = text/html |
| json_module | = json | The module used for serialization and deserialization of JSON data within the response object. |
| autocorrect_location_header | = false | Whether to automatically correct the Location header to be an absolute URL. |
| max_cookie_size | int | Read-only view of the :data:MAX_COOKIE_SIZE config key. |
Constructor
Signature
def Response()
Methods
max_cookie_size()
@classmethod
def max_cookie_size() - > int
Read-only view of the :data:MAX_COOKIE_SIZE config key.
Returns
| Type | Description |
|---|---|
int | The maximum allowed size for cookies in bytes, retrieved from the current application configuration or the Werkzeug default. |