- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 578 for HEADERS (0.11 sec)
-
tests/test_tutorial/test_header_param_models/test_tutorial002.py
mod = importlib.import_module(f"docs_src.header_param_models.{request.param}") client = TestClient(mod.app) client.headers.clear() return client def test_header_param_model(client: TestClient): response = client.get( "/items/", headers=[ ("save-data", "true"), ("if-modified-since", "yesterday"), ("traceparent", "123"),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 9.5K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial001.py
client = TestClient(app) @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"User-Agent": "testclient"}), ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}), ("/items", {"User-Agent": "FastAPI test"}, 200, {"User-Agent": "FastAPI test"}), ], ) def test(path, headers, expected_status, expected_response):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.8K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial002.py
"/items", {"strange-header": "Not really underscore"}, 200, {"strange_header": None}, ), ], ) def test(path, headers, expected_status, expected_response): response = client.get(path, headers=headers) assert response.status_code == expected_status assert response.json() == expected_response def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003.py
200, {"X-Token values": ["foo", "bar"]}, ), ], ) def test(path, headers, expected_status, expected_response): response = client.get(path, headers=headers) assert response.status_code == expected_status assert response.json() == expected_response def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 12 14:52:00 UTC 2024 - 4.1K bytes - Viewed (0) -
docs/changelogs/upgrading_to_okhttp_4.md
readTimeoutMillis, retryOnConnectionFailure, socketFactory, sslSocketFactory, writeTimeoutMillis * **PushPromise**: headers, method, path, response * **Request**: body, cacheControl, headers, method, url * **Response**: body, cacheControl, cacheResponse, code, handshake, headers, message, networkResponse, priorResponse, protocol, receivedResponseAtMillis, request, sentRequestAtMillis
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 16:58:16 UTC 2022 - 10.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt
this.sentRequestMillis = cacheResponse.sentRequestAtMillis this.receivedResponseMillis = cacheResponse.receivedResponseAtMillis val headers = cacheResponse.headers for (i in 0 until headers.size) { val fieldName = headers.name(i) val value = headers.value(i) when { fieldName.equals("Date", ignoreCase = true) -> { servedDate = value.toHttpDateOrNull()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 12K bytes - Viewed (0) -
docs/changelogs/changelog_2x.md
API. Requests made with OkUrlFactory will continue to have a default user agent. * New: Guava-like API to create headers: ```java Headers headers = Headers.of(name1, value1, name2, value2, ...). ``` * New: Make the content-type header optional for request bodies. * New: `Response.isSuccessful()` is a convenient API to check response codes.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 26.6K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial002_py310.py
{"strange-header": "Not really underscore"}, 200, {"strange_header": None}, ), ], ) def test(path, headers, expected_status, expected_response, client: TestClient): response = client.get(path, headers=headers) assert response.status_code == expected_status assert response.json() == expected_response @needs_py310 def test_openapi_schema():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.2K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003_an.py
@pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"X-Token values": None}), ("/items", {"x-token": "foo"}, 200, {"X-Token values": ["foo"]}), # TODO: fix this, is it a bug? # ("/items", [("x-token", "foo"), ("x-token", "bar")], 200, {"X-Token values": ["foo", "bar"]}), ], ) def test(path, headers, expected_status, 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) -
okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt
client.listener.assertTextMessage(message) } @Test fun messagesCompressedWhenConfigured() { val headers = headersOf("Sec-WebSocket-Extensions", "permessage-deflate") client.initWebSocket(random, responseHeaders = headers) server.initWebSocket(random, responseHeaders = headers) val message = repeat('a', RealWebSocket.DEFAULT_MINIMUM_DEFLATE_SIZE.toInt()) server.webSocket!!.send(message)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 01:59:58 UTC 2024 - 18.5K bytes - Viewed (0)