- Sort Score
- Num 10 results
- Language All
Results 121 - 130 of 297 for Cookie2 (0.05 seconds)
-
docs/es/docs/tutorial/cors.md
También es posible declarar la lista como `"*"` (un "comodín") para decir que todos están permitidos. Pero eso solo permitirá ciertos tipos de comunicación, excluyendo todo lo que implique credenciales: Cookies, headers de autorización como los utilizados con Bearer Tokens, etc. Así que, para que todo funcione correctamente, es mejor especificar explícitamente los orígenes permitidos. ## Usa `CORSMiddleware` { #use-corsmiddleware }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 5.9K bytes - Click Count (0) -
docs/de/docs/advanced/response-change-status-code.md
## Einen `Response`-Parameter verwenden { #use-a-response-parameter } Sie können einen Parameter vom Typ `Response` in Ihrer *Pfadoperation-Funktion* deklarieren (wie Sie es auch für Cookies und Header tun können). Anschließend können Sie den `status_code` in diesem *vorübergehenden* <abbr title="Response – Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr>-Objekt festlegen.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 2K bytes - Click Count (0) -
docs_src/cookie_params/tutorial001_py310.py
from fastapi import Cookie, FastAPI app = FastAPI() @app.get("/items/") async def read_items(ads_id: str | None = Cookie(default=None)):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 170 bytes - Click Count (0) -
docs_src/dependencies/tutorial005_py310.py
from fastapi import Cookie, Depends, FastAPI app = FastAPI() def query_extractor(q: str | None = None): return q def query_or_cookie_extractor( q: str = Depends(query_extractor), last_query: str | None = Cookie(default=None) ): if not q: return last_query return q @app.get("/items/") async def read_query(query_or_default: str = Depends(query_or_cookie_extractor)):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 443 bytes - Click Count (0) -
docs_src/cookie_params/tutorial001_py39.py
from typing import Union from fastapi import Cookie, FastAPI app = FastAPI() @app.get("/items/") async def read_items(ads_id: Union[str, None] = Cookie(default=None)):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 202 bytes - Click Count (0) -
docs_src/dependencies/tutorial005_an_py310.py
from typing import Annotated from fastapi import Cookie, Depends, FastAPI app = FastAPI() def query_extractor(q: str | None = None): return q def query_or_cookie_extractor( q: Annotated[str, Depends(query_extractor)], last_query: Annotated[str | None, Cookie()] = None, ): if not q: return last_query return q @app.get("/items/") async def read_query(
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 510 bytes - Click Count (0) -
docs/es/docs/advanced/response-change-status-code.md
Para esos casos, puedes usar un parámetro `Response`. ## Usa un parámetro `Response` { #use-a-response-parameter } Puedes declarar un parámetro de tipo `Response` en tu *path operation function* (como puedes hacer para cookies y headers). Y luego puedes establecer el `status_code` en ese objeto de response *temporal*. {* ../../docs_src/response_change_status_code/tutorial001_py39.py hl[1,9,12] *}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.7K bytes - Click Count (0) -
docs_src/dependencies/tutorial005_an_py39.py
from typing import Annotated, Union from fastapi import Cookie, Depends, FastAPI app = FastAPI() def query_extractor(q: Union[str, None] = None): return q def query_or_cookie_extractor( q: Annotated[str, Depends(query_extractor)], last_query: Annotated[Union[str, None], Cookie()] = None, ): if not q: return last_query return q @app.get("/items/") async def read_query(
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 529 bytes - Click Count (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 }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 5.5K bytes - Click Count (0) -
docs_src/websockets/tutorial002_py39.py
from typing import Union from fastapi import ( Cookie, Depends, FastAPI, Query, WebSocket, WebSocketException, status, ) from fastapi.responses import HTMLResponse app = FastAPI() html = """ <!DOCTYPE html> <html> <head> <title>Chat</title> </head> <body> <h1>WebSocket Chat</h1> <form action="" onsubmit="sendMessage(event)">
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 2.8K bytes - Click Count (0)