- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 310 for cookey (0.05 sec)
-
tests/test_tutorial/test_cookie_params/test_tutorial001_py310.py
{"ads_id": "ads_track"}, ), ("/items", {"session": "cookiesession"}, 200, {"ads_id": None}), ], ) def test(path, cookies, expected_status, expected_response): from docs_src.cookie_params.tutorial001_py310 import app client = TestClient(app, cookies=cookies) response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an.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"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt
} } fun CookieJar.receiveHeaders( url: HttpUrl, headers: Headers, ) { if (this === CookieJar.NO_COOKIES) return val cookies = Cookie.parseAll(url, headers) if (cookies.isEmpty()) return saveFromResponse(url, cookies) } /** * Returns true if the response headers and status indicate that this response has a (possibly * 0-length) body. See RFC 7231. */
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.2K 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"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Nov 13 14:26:09 UTC 2022 - 3.6K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_py310.py
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"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/test_security_api_key_cookie_optional.py
if current_user is None: return {"msg": "Create an account first"} else: return current_user def test_security_api_key(): client = TestClient(app, cookies={"key": "secret"}) response = client.get("/users/me") assert response.status_code == 200, response.text assert response.json() == {"username": "secret"} def test_security_api_key_no_key():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
.clearHeaders() .addHeader("Cookie: s=square") .addHeader("Cookie", "a=android") assertThat(headersToList(response)) .containsExactly("Cookie: s=square", "Cookie: a=android") } @Test fun mockResponseSetHeader() { val response = MockResponse() .clearHeaders() .addHeader("Cookie: s=square") .addHeader("Cookie: a=android")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 21.9K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
.clearHeaders() .addHeader("Cookie: s=square") .addHeader("Cookie", "a=android") assertThat(headersToList(builder)).containsExactly("Cookie: s=square", "Cookie: a=android") } @Test fun mockResponseSetHeader() { val builder = MockResponse.Builder() .clearHeaders() .addHeader("Cookie: s=square") .addHeader("Cookie: a=android")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.5K bytes - Viewed (0) -
tests/test_security_api_key_cookie.py
return user @app.get("/users/me") def read_current_user(current_user: User = Depends(get_current_user)): return current_user def test_security_api_key(): client = TestClient(app, cookies={"key": "secret"}) response = client.get("/users/me") assert response.status_code == 200, response.text assert response.json() == {"username": "secret"} def test_security_api_key_no_key():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/DateFormatting.kt
import okhttp3.internal.UTC /** The last four-digit year: "Fri, 31 Dec 9999 23:59:59 GMT". */ internal const val MAX_DATE = 253402300799999L /** * Most websites serve cookies in the blessed format. Eagerly create the parser to ensure such * cookies are on the fast path. */ private val STANDARD_DATE_FORMAT = object : ThreadLocal<DateFormat>() { override fun initialValue(): DateFormat {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.1K bytes - Viewed (0)