- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 578 for headersOf (0.06 sec)
-
okhttp/src/main/kotlin/okhttp3/Cache.kt
/** * Returns the subset of the headers in this's request that impact the content of this's body. */ fun Response.varyHeaders(): Headers { // Use the request headers sent over the network, since that's what the response varies on. // Otherwise OkHttp-supplied headers like "Accept-Encoding: gzip" may be lost. val requestHeaders = networkResponse!!.request.headers val responseHeaders = headers
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 26.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CookiesTest.kt
) .build() server.enqueue(MockResponse()) get(server.url("/")) val request = server.takeRequest() assertThat(request.headers["Cookie"]).isEqualTo("Bar=bar; Baz=baz") assertThat(request.headers["Cookie2"]).isNull() assertThat(request.headers["Quux"]).isNull() } @Test fun acceptOriginalServerMatchesSubdomain() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial001.py
assert response.headers["WWW-Authenticate"] == "Bearer" def test_token(): response = client.get("/items", headers={"Authorization": "Bearer testtoken"}) assert response.status_code == 200, response.text assert response.json() == {"token": "testtoken"} def test_incorrect_token(): response = client.get("/items", headers={"Authorization": "Notexistent testtoken"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003.py
def test_incorrect_token(): response = client.get("/users/me", headers={"Authorization": "Bearer nonexistent"}) assert response.status_code == 401, response.text assert response.json() == {"detail": "Invalid authentication credentials"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_incorrect_token_type(): response = client.get( "/users/me", headers={"Authorization": "Notexistent testtoken"} )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt
else -> null } } 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_security/test_tutorial003_an_py39.py
response = client.get("/users/me", headers={"Authorization": "Bearer nonexistent"}) assert response.status_code == 401, response.text assert response.json() == {"detail": "Invalid authentication credentials"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py39 def test_incorrect_token_type(client: TestClient): response = client.get( "/users/me", headers={"Authorization": "Notexistent testtoken"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.4K bytes - Viewed (0) -
internal/http/response-recorder.go
ttfbBody time.Duration StartTime time.Time // number of bytes written bytesWritten int // number of bytes of response headers written headerBytesWritten int // Internal recording buffer headers bytes.Buffer body bytes.Buffer // Indicate if headers are written in the log headersLogged bool } // Hijack - hijacks the underlying connection
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 17:13:00 UTC 2024 - 5.5K bytes - Viewed (0) -
tests/test_tutorial/test_bigger_applications/test_main_an_py39.py
"/items?token=jessica", headers={"X-Token": "fake-super-secret-token"} ) assert response.status_code == 200 assert response.json() == { "plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}, } @needs_py39 def test_items_with_no_token_jessica(client: TestClient): response = client.get("/items", headers={"X-Token": "fake-super-secret-token"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 24.9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/SynchronousGet.java
.build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); Headers responseHeaders = response.headers(); for (int i = 0; i < responseHeaders.size(); i++) { System.out.println(responseHeaders.name(i) + ": " + responseHeaders.value(i)); } System.out.println(response.body().string());
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun May 22 01:29:42 UTC 2016 - 1.5K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial001_an.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)