- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 206 for COOKIE (0.27 sec)
-
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(
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 529 bytes - Viewed (0) -
tests/test_params_repr.py
def test_cookie_repr_str(): assert repr(Cookie("teststr")) == "Cookie(teststr)" def test_cookie_repr_none(): assert repr(Cookie(None)) == "Cookie(None)" def test_cookie_repr_ellipsis(): assert repr(Cookie(...)) == IsOneOf( "Cookie(PydanticUndefined)", # TODO: remove when deprecating Pydantic v1 "Cookie(Ellipsis)", )
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 3.3K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_py310.py
@needs_py310 def test_websocket_with_cookie(app: FastAPI): client = TestClient(app, cookies={"session": "fakesession"}) with pytest.raises(WebSocketDisconnect): with client.websocket_connect("/items/foo/ws") as websocket: message = "Message one" websocket.send_text(message) data = websocket.receive_text() assert data == "Session cookie or query token value is: fakesession"
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 3.9K bytes - Viewed (0) -
doc/next/6-stdlib/99-minor/net/http/46443.md
Plain Text - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Fri Apr 19 14:33:17 GMT 2024 - 155 bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CookiesTest.kt
assertThat(cookie.value).isEqualTo("android") assertThat(cookie.comment).isNull() assertThat(cookie.commentURL).isNull() assertThat(cookie.discard).isFalse() assertThat(cookie.maxAge).isGreaterThan(100000000000L) assertThat(cookie.path).isEqualTo("/path") assertThat(cookie.secure).isTrue() assertThat(cookie.version).isEqualTo(0) } @Test fun testRfc2109Response() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 13K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002.py
def test_websocket_with_cookie(): client = TestClient(app, cookies={"session": "fakesession"}) with pytest.raises(WebSocketDisconnect): with client.websocket_connect("/items/foo/ws") as websocket: message = "Message one" websocket.send_text(message) data = websocket.receive_text() assert data == "Session cookie or query token value is: fakesession"
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Nov 13 14:26:09 GMT 2022 - 3.6K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/helper/RoleQueryHelperTest.java
} }; Set<String> roleSet; Cookie cookie; roleSet = buildByCookie(roleQueryHelperImpl, getMockRequest()); assertEquals(0, roleSet.size()); cookie = new Cookie("aaa", "bbb"); getMockRequest().addCookie(cookie); try { roleSet = buildByCookie(roleQueryHelperImpl, getMockRequest()); fail();
Java - Registered: Mon May 06 08:04:11 GMT 2024 - Last Modified: Thu Feb 22 01:37:57 GMT 2024 - 14.2K bytes - Viewed (0) -
tests/test_param_include_in_schema.py
from typing import Optional import pytest from fastapi import Cookie, FastAPI, Header, Path, Query from fastapi.testclient import TestClient app = FastAPI() @app.get("/hidden_cookie") async def hidden_cookie( hidden_cookie: Optional[str] = Cookie(default=None, include_in_schema=False), ): return {"hidden_cookie": hidden_cookie} @app.get("/hidden_header") async def hidden_header(
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 7.4K bytes - Viewed (0) -
tests/test_schema_extra_examples.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 37.7K bytes - Viewed (0) -
docs/de/docs/reference/responses.md
- set_cookie - delete_cookie ::: fastapi.responses.Response options: members: - charset - status_code - media_type - body - background - raw_headers - render - init_headers - headers - set_cookie - delete_cookie
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Feb 19 15:53:39 GMT 2024 - 3.8K bytes - Viewed (0)