- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 1,223 for headers (0.1 sec)
-
docs_src/header_param_models/tutorial002_pv1_an.py
return headers...
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 490 bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MultipartReaderTest.kt
body.writeTo(bodyContent) val reader = MultipartReader(bodyContent, "boundary") val quickPart = reader.nextPart()!! assertThat(quickPart.headers).isEqualTo( headersOf( "Content-Type", "text/plain; charset=utf-8", ), ) assertThat(quickPart.body.readUtf8()).isEqualTo("Quick") val brownPart = reader.nextPart()!! assertThat(brownPart.headers).isEqualTo(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13.8K 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) -
tests/test_tutorial/test_dependencies/test_tutorial006_an_py39.py
def test_get_invalid_one_header(client: TestClient): response = client.get("/items/", headers={"X-Token": "invalid"}) assert response.status_code == 400, response.text assert response.json() == {"detail": "X-Token header invalid"} @needs_py39 def test_get_invalid_second_header(client: TestClient): response = client.get( "/items/", headers={"X-Token": "fake-super-secret-token", "X-Key": "invalid"} )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 5.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 108.6K bytes - Viewed (0) -
tests/test_starlette_exception.py
@app.get("/items/{item_id}") async def read_item(item_id: str): if item_id not in items: raise HTTPException( status_code=404, detail="Item not found", headers={"X-Error": "Some custom header"}, ) return {"item": items[item_id]} @app.get("/http-no-body-statuscode-exception") async def no_body_status_code_exception(): raise HTTPException(status_code=204)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt
return millis.toInt() } internal fun List<Header>.toHeaders(): Headers { val builder = Headers.Builder() for ((name, value) in this) { builder.addLenient(name.utf8(), value.utf8()) } return builder.build() } internal fun Headers.toHeaderList(): List<Header> = (0 until size).map { Header(name(it), value(it)) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 10.7K 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) -
cmd/object-api-options.go
clientKey, err = crypto.SSEC.ParseHTTP(header) if err != nil { return } if sse, err = encrypt.NewSSEC(clientKey[:]); err != nil { return } opts.ServerSideEncryption = sse return } if crypto.S3.IsRequested(header) || (metadata != nil && crypto.S3.IsEncrypted(metadata)) { opts.ServerSideEncryption = encrypt.NewSSE() } return } // get ObjectOptions for GET calls from encryption headers
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 21 21:13:59 UTC 2024 - 14.4K 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)