]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
Add note about Cookies an JavaScript on cookie-params.md add-note-about-cookies-on-the-cookie-params 13510/head
authorMarcelo Trylesinski <marcelotryle@gmail.com>
Thu, 20 Mar 2025 10:31:28 +0000 (10:31 +0000)
committerMarcelo Trylesinski <marcelotryle@gmail.com>
Thu, 20 Mar 2025 10:31:28 +0000 (10:31 +0000)
docs/en/docs/tutorial/cookie-params.md

index 5341406d51cf186091b02edaf83ff152f971cb36..a069e742a048dbd8cf4c0cda14ad2b09ce37ccea 100644 (file)
@@ -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
 
 Declare cookies with `Cookie`, using the same common pattern as `Query` and `Path`.