mirror of https://github.com/tiangolo/fastapi.git
📝 Add note about Cookies and JavaScript on `tutorial/cookie-params.md` (#13510)
Co-authored-by: svlandeg <svlandeg@github.com>
This commit is contained in:
parent
60213f5a31
commit
cd2e1e43bd
|
|
@ -30,6 +30,16 @@ To declare cookies, you need to use `Cookie`, because otherwise the parameters w
|
|||
|
||||
///
|
||||
|
||||
/// info
|
||||
|
||||
Have in mind that, as **browsers handle cookies** in special ways and behind the scenes, they **don't** easily allow **JavaScript** to touch them.
|
||||
|
||||
If you go to the **API docs UI** at `/docs` you will be able to see the **documentation** for cookies for your *path operations*.
|
||||
|
||||
But even if you **fill the data** and click "Execute", because the docs UI works with **JavaScript**, the cookies won't be sent, and you will see an **error** message as if you didn't write any values.
|
||||
|
||||
///
|
||||
|
||||
## Recap { #recap }
|
||||
|
||||
Declare cookies with `Cookie`, using the same common pattern as `Query` and `Path`.
|
||||
|
|
|
|||
Loading…
Reference in New Issue