- Sort Score
- Result 10 results
- Languages All
Results 201 - 210 of 749 for header_1 (0.18 sec)
-
okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt
data?.let { request.method(requestMethod, it.toRequestBody(mediaType())) } for (header in headers.orEmpty()) { val parts = header.split(':', limit = 2) if (!isSpecialHeader(parts[0])) { request.header(parts[0], parts[1]) } } referer?.let { request.header("Referer", it) } request.header("User-Agent", userAgent) return request.build() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.7K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_py310.py
assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py310 def test_token(client: TestClient): access_token = get_access_token(scope="me", client=client) response = client.get( "/users/me", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_py39.py
assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py39 def test_token(client: TestClient): access_token = get_access_token(scope="me", client=client) response = client.get( "/users/me", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_response_headers/test_tutorial001.py
client = TestClient(app) def test_path_operation(): response = client.get("/headers/") assert response.status_code == 200, response.text assert response.json() == {"message": "Hello World"} assert response.headers["X-Cat-Dog"] == "alone in the world"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 426 bytes - Viewed (0) -
cmd/signature-v4_test.go
if e != nil { t.Errorf("(%d) failed to create http.Request, got %v", i, e) } // Do the same for the headers. for key, value := range testCase.headers { req.Header.Set(key, value) } // parse form. req.ParseForm() // Check if it matches! err := doesPresignedSignatureMatch(payloadSHA256, req, testCase.region, serviceS3)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jun 13 22:26:38 UTC 2024 - 10.5K bytes - Viewed (0) -
src/archive/zip/reader.go
} b = b[22:] // skip over most of the header filenameLen := int(b.uint16()) extraLen := int(b.uint16()) return int64(fileHeaderLen + filenameLen + extraLen), nil } // readDirectoryHeader attempts to read a directory header from r. // It returns io.ErrUnexpectedEOF if it cannot read a complete header, // and ErrFormat if it doesn't find a valid header signature.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Sat Aug 03 01:05:29 UTC 2024 - 28.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallKotlinTest.kt
MockResponse( code = 302, headers = headersOf("Location", "/b"), ), ) server.enqueue(MockResponse()) val request = Request(server.url("/")) val call = client.newCall(request) val response = call.execute() assertThat(response.request.url.encodedPath).isEqualTo("/b") assertThat(response.request.headers).isEqualTo(headersOf()) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 8.4K bytes - Viewed (0) -
samples/compare/src/test/kotlin/okhttp3/compare/OkHttpClientTest.kt
.url(server.url("/")) .header("Accept", "text/plain") .build() val response = client.newCall(request).execute() assertThat(response.code).isEqualTo(200) assertThat(response.body.string()).isEqualTo("hello, OkHttp") val recorded = server.takeRequest() assertThat(recorded.headers["Accept"]).isEqualTo("text/plain") assertThat(recorded.headers["Accept-Encoding"]).isEqualTo("gzip")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.8K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial001_py310.py
@needs_py310 @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, client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt
Request.Builder() .url(server.url("/")) .header("Connection", "close") .build() val requestB = Request(server.url("/")) assertConnectionNotReused(requestA, requestB) } @Test fun connectionsAreNotReusedWithResponseConnectionClose() { server.enqueue( MockResponse( headers = headersOf("Connection", "close"), body = "a", ), )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 12.3K bytes - Viewed (0)