forked from orbit-oss/flask
added a new behaviour for responses that enable the tuple to be in the form of (response, headers) and continiue to support the (response, status, headers) format.
This commit is contained in:
parent
afd3c4532b
commit
70f8b39c52
3 changed files with 39 additions and 12 deletions
|
|
@ -676,9 +676,9 @@ converting return values into response objects is as follows:
|
|||
default parameters.
|
||||
3. If a tuple is returned the items in the tuple can provide extra
|
||||
information. Such tuples have to be in the form ``(response, status,
|
||||
headers)`` where at least one item has to be in the tuple. The
|
||||
`status` value will override the status code and `headers` can be a
|
||||
list or dictionary of additional header values.
|
||||
headers)`` or ``(response, headers)`` where at least one item has
|
||||
to be in the tuple. The `status` value will override the status code
|
||||
and `headers` can be a list or dictionary of additional header values.
|
||||
4. If none of that works, Flask will assume the return value is a
|
||||
valid WSGI application and convert that into a response object.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue