- Sort Score
- Num 10 results
- Language All
Results 121 - 130 of 302 for cookie1 (0.04 seconds)
-
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_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/changelogs/changelog_4x.md
## Version 4.9.2 _2021-09-30_ * Fix: Don't include potentially-sensitive header values in `Headers.toString()` or exceptions. This applies to `Authorization`, `Cookie`, `Proxy-Authorization`, and `Set-Cookie` headers. * Fix: Don't crash with an `InaccessibleObjectException` when running on JDK17+ with strong encapsulation enabled.
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Apr 17 13:25:31 GMT 2024 - 25.2K 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) -
fastapi/__init__.py
from .exceptions import HTTPException as HTTPException from .exceptions import WebSocketException as WebSocketException from .param_functions import Body as Body from .param_functions import Cookie as Cookie from .param_functions import Depends as Depends from .param_functions import File as File from .param_functions import Form as Form from .param_functions import Header as Header from .param_functions import Path as Path
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 15:19:50 GMT 2025 - 1.1K bytes - Click Count (0) -
docs_src/cookie_params/tutorial001_an_py310.py
from typing import Annotated from fastapi import Cookie, FastAPI app = FastAPI() @app.get("/items/") async def read_items(ads_id: Annotated[str | None, Cookie()] = None):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 205 bytes - Click Count (0) -
docs_src/cookie_params/tutorial001_an_py39.py
from typing import Annotated, Union from fastapi import Cookie, FastAPI app = FastAPI() @app.get("/items/") async def read_items(ads_id: Annotated[Union[str, None], Cookie()] = None):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 218 bytes - Click Count (0) -
docs/ru/docs/advanced/response-change-status-code.md
Для таких случаев вы можете использовать параметр `Response`. ## Использование параметра `Response` { #use-a-response-parameter } Вы можете объявить параметр типа `Response` в вашей *функции обработки пути* (как и для cookies и HTTP-заголовков). И затем вы можете установить `status_code` в этом *временном* объекте ответа. {* ../../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 - 2.7K bytes - Click Count (0)