mirror of https://github.com/encode/starlette.git
Tweak to cookie docs
This commit is contained in:
parent
4dedf7ce96
commit
07581a7dd6
|
@ -57,14 +57,10 @@ For example: `request.query_params['abc']`
|
|||
|
||||
#### Cookies
|
||||
|
||||
Cookies are exposed as an immutable dict.
|
||||
|
||||
**Note**: Exception `KeyError` will be raised if nonexistant key is accessed as `request.cookies['key']`.
|
||||
Instead cookies should be accessed with the `.get` method.
|
||||
Cookies are exposed as a regular dictionary interface.
|
||||
|
||||
For example: `request.cookies.get('mycookie')`
|
||||
|
||||
|
||||
#### Body
|
||||
|
||||
There are a few different interfaces for returning the body of the request:
|
||||
|
|
Loading…
Reference in New Issue