- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 62 for cookies (0.07 sec)
-
docs/en/docs/advanced/response-cookies.md
# Response Cookies { #response-cookies } ## Use a `Response` parameter { #use-a-response-parameter } You can declare a parameter of type `Response` in your *path operation function*. And then you can set cookies in that *temporal* response object. {* ../../docs_src/response_cookies/tutorial002.py hl[1, 8:9] *} And then you can return any object you need, as you normally would (a `dict`, a database model, etc).Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 2.2K bytes - Viewed (0) -
docs/en/docs/tutorial/cookie-param-models.md
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 3.1K bytes - Viewed (0) -
docs/en/docs/tutorial/cookie-params.md
# Cookie Parameters { #cookie-parameters } You can define Cookie parameters the same way you define `Query` and `Path` parameters. ## Import `Cookie` { #import-cookie } First import `Cookie`: {* ../../docs_src/cookie_params/tutorial001_an_py310.py hl[3] *} ## Declare `Cookie` parameters { #declare-cookie-parameters } Then declare the cookie parameters using the same structure as with `Path` and `Query`.Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 1.1K bytes - Viewed (0) -
docs/en/docs/advanced/response-change-status-code.md
For those cases, you can use a `Response` parameter. ## Use a `Response` parameter { #use-a-response-parameter } You can declare a parameter of type `Response` in your *path operation function* (as you can do for cookies and headers). And then you can set the `status_code` in that *temporal* response object. {* ../../docs_src/response_change_status_code/tutorial001.py hl[1,9,12] *}Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 1.5K bytes - Viewed (0) -
docs/en/docs/advanced/response-headers.md
**FastAPI** will use that *temporal* response to extract the headers (also cookies and status code), and will put them in the final response that contains the value you returned, filtered by any `response_model`. You can also declare the `Response` parameter in dependencies, and set headers (and cookies) in them. ## Return a `Response` directly { #return-a-response-directly }
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 2.3K bytes - Viewed (0) -
docs/en/docs/tutorial/cors.md
## Wildcards { #wildcards } It's also possible to declare the list as `"*"` (a "wildcard") to say that all are allowed. But that will only allow certain types of communication, excluding everything that involves credentials: Cookies, Authorization headers like those used with Bearer Tokens, etc. So, for everything to work correctly, it's better to specify explicitly the allowed origins. ## Use `CORSMiddleware` { #use-corsmiddleware }Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 5.5K bytes - Viewed (0) -
docs/en/docs/tutorial/query-param-models.md
} ] } ``` ## Summary { #summary } You can use **Pydantic models** to declare **query parameters** in **FastAPI**. π /// tip Spoiler alert: you can also use Pydantic models to declare cookies and headers, but you will read about that later in the tutorial. π€«Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 2.2K bytes - Viewed (0) -
docs/en/docs/tutorial/testing.md
* If you need to send *Form Data* instead of JSON, use the `data` parameter instead. * To pass *headers*, use a `dict` in the `headers` parameter. * For *cookies*, a `dict` in the `cookies` parameter. For more information about how to pass data to the backend (using `httpx` or the `TestClient`) check the <a href="https://www.python-httpx.org" class="external-link" target="_blank">HTTPX documentation</a>.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 6.6K bytes - Viewed (0) -
docs/uk/docs/index.md
* <abbr title="ΡΠ°ΠΊΠΎΠΆ Π²ΡΠ΄ΠΎΠΌΠΈΠΉ ΡΠΊ: serialization, parsing, marshalling">ΠΠ΅ΡΠ΅ΡΠ²ΠΎΡΠ΅Π½Π½Ρ</abbr> Π²Ρ ΡΠ΄Π½ΠΈΡ Π΄Π°Π½ΠΈΡ : Π· ΠΌΠ΅ΡΠ΅ΠΆΡ Π΄ΠΎ Π΄Π°Π½ΠΈΡ Ρ ΡΠΈΠΏΡΠ² Python. Π§ΠΈΡΠ°Π½Π½Ρ Π·: * JSON. * ΠΠ°ΡΠ°ΠΌΠ΅ΡΡΡΠ² ΡΠ»ΡΡ Ρ. * ΠΠ°ΡΠ°ΠΌΠ΅ΡΡΡΠ² Π·Π°ΠΏΠΈΡΡ. * Cookies. * Headers. * Forms. * Π€Π°ΠΉΠ»ΡΠ². * <abbr title="ΡΠ°ΠΊΠΎΠΆ Π²ΡΠ΄ΠΎΠΌΠΈΠΉ ΡΠΊ: serialization, parsing, marshalling">ΠΠ΅ΡΠ΅ΡΠ²ΠΎΡΠ΅Π½Π½Ρ</abbr> Π²ΠΈΡ ΡΠ΄Π½ΠΈΡ Π΄Π°Π½ΠΈΡ : Π· ΡΠΈΠΏΡΠ² Ρ Π΄Π°Π½ΠΈΡ Python Π΄ΠΎ ΠΌΠ΅ΡΠ΅ΠΆΠ΅Π²ΠΈΡ Π΄Π°Π½ΠΈΡ (ΡΠΊ JSON):
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 10:49:48 UTC 2025 - 24.2K bytes - Viewed (0) -
docs/en/docs/advanced/using-request-directly.md
# Using the Request Directly { #using-the-request-directly } Up to now, you have been declaring the parts of the request that you need with their types. Taking data from: * The path as parameters. * Headers. * Cookies. * etc. And by doing so, **FastAPI** is validating that data, converting it and generating documentation for your API automatically. But there are situations where you might need to access the `Request` object directly.Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 2.4K bytes - Viewed (0)