- Sort Score
- Result 10 results
- Languages All
Results 231 - 240 of 288 for cookie (0.09 sec)
-
docs/zh/docs/advanced/response-change-status-code.md
对于这些情况,你可以使用一个`Response`参数。 ## 使用 `Response` 参数 你可以在你的*路径操作函数*中声明一个`Response`类型的参数(就像你可以为cookies和头部做的那样)。 然后你可以在这个*临时*响应对象中设置`status_code`。 ```Python hl_lines="1 9 12" {!../../docs_src/response_change_status_code/tutorial001.py!} ``` 然后你可以像平常一样返回任何你需要的对象(例如一个`dict`或者一个数据库模型)。如果你声明了一个`response_model`,它仍然会被用来过滤和转换你返回的对象。 **FastAPI**将使用这个临时响应来提取状态码(也包括cookies和头部),并将它们放入包含你返回的值的最终响应中,该响应由任何`response_model`过滤。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.4K bytes - Viewed (0) -
docs/en/docs/tutorial/cors.md
## 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`
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.1K bytes - Viewed (0) -
docs/pt/docs/tutorial/cors.md
## Curingas É possível declarar uma lista com `"*"` (um "curinga") para dizer que tudo está permitido. Mas isso só permitirá certos tipos de comunicação, excluindo tudo que envolva credenciais: cookies, cabeçalhos de autorização como aqueles usados com Bearer Tokens, etc. Então, para que tudo funcione corretamente, é melhor especificar explicitamente as origens permitidas. ## Usar `CORSMiddleware`
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.5K bytes - Viewed (0) -
docs/en/docs/reference/response.md
# `Response` class You can declare a parameter in a *path operation function* or dependency to be of type `Response` and then you can set data for the response like headers or cookies. You can also use it directly to create an instance of it and return it from your *path operations*. You can import it directly from `fastapi`: ```python from fastapi import Response ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 397 bytes - Viewed (0) -
docs/zh/docs/tutorial/cors.md
## 通配符 也可以使用 `"*"`(一个「通配符」)声明这个列表,表示全部都是允许的。 但这仅允许某些类型的通信,不包括所有涉及凭据的内容:像 Cookies 以及那些使用 Bearer 令牌的授权 headers 等。 因此,为了一切都能正常工作,最好显式地指定允许的源。 ## 使用 `CORSMiddleware` 你可以在 **FastAPI** 应用中使用 `CORSMiddleware` 来配置它。 * 导入 `CORSMiddleware`。 * 创建一个允许的源列表(由字符串组成)。 * 将其作为「中间件」添加到你的 **FastAPI** 应用中。 你也可以指定后端是否允许: * 凭证(授权 headers,Cookies 等)。 * 特定的 HTTP 方法(`POST`,`PUT`)或者使用通配符 `"*"` 允许所有方法。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.5K bytes - Viewed (0) -
docs/en/docs/reference/websockets.md
options: members: - scope - app - url - base_url - headers - query_params - path_params - cookies - client - state - url_for - client_state - application_state - receive - send - accept
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 1.7K bytes - Viewed (0) -
docs/fr/docs/features.md
* Clés d'API dans: * Le header. * Les paramètres de requêtes. * Les cookies, etc. Plus toutes les fonctionnalités de sécurités venant de Starlette (incluant les **cookies de sessions**). Le tout conçu en composant réutilisable facilement intégrable à vos systèmes, data stores, base de données relationnelle ou NoSQL, etc.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 11.1K bytes - Viewed (0) -
docs/zh/docs/tutorial/testing.md
接着只需在测试中同样操作。 示例: * 传一个*路径* 或*查询* 参数,添加到URL上。 * 传一个JSON体,传一个Python对象(例如一个`dict`)到参数 `json`。 * 如果你需要发送 *Form Data* 而不是 JSON,使用 `data` 参数。 * 要发送 *headers*,传 `dict` 给 `headers` 参数。 * 对于 *cookies*,传 `dict` 给 `cookies` 参数。 关于如何传数据给后端的更多信息 (使用`httpx` 或 `TestClient`),请查阅 <a href="https://www.python-httpx.org" class="external-link" target="_blank">HTTPX 文档</a>. /// info | "信息"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6K bytes - Viewed (0) -
docs/en/docs/async.md
This is "synchronous" work, you are "synchronized" with the cashier/cook 👨🍳. You have to wait 🕙 and be there at the exact moment that the cashier/cook 👨🍳 finishes the burgers and gives them to you, or otherwise, someone else might take them. <img src="/img/async/parallel-burgers/parallel-burgers-04.png" class="illustration">
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Aug 28 23:33:37 UTC 2024 - 23.5K bytes - Viewed (0) -
docs/pt/docs/tutorial/testing.md
* Se você precisar enviar *Dados de Formulário* em vez de JSON, use o parâmetro `data`. * Para passar *headers*, use um `dict` no parâmetro `headers`. * Para *cookies*, um `dict` no parâmetro `cookies`. Para mais informações sobre como passar dados para o backend (usando `httpx` ou `TestClient`), consulte a <a href="https://www.python-httpx.org" class="external-link" target="_blank">documentação do HTTPX</a>.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.9K bytes - Viewed (0)