- Sort Score
- Num 10 results
- Language All
Results 161 - 170 of 1,379 for header2 (0.05 seconds)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/CallServerInterceptor.kt
val hasRequestBody = HttpMethod.permitsRequestBody(request.method) && requestBody != null val isUpgradeRequest = "upgrade".equals(request.header("Connection"), ignoreCase = true) try { exchange.writeRequestHeaders(request) if (hasRequestBody) { // If there's a "Expect: 100-continue" header on the request, wait for a "HTTP/1.1 100 // Continue" response before transmitting the request body. If we don't get that, return
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Thu Oct 30 13:46:58 GMT 2025 - 7.6K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/BridgeInterceptor.kt
transparentGzip = true requestBuilder.header("Accept-Encoding", "gzip") } val cookies = cookieJar.loadForRequest(userRequest.url) if (cookies.isNotEmpty()) { requestBuilder.header("Cookie", cookieHeader(cookies)) } if (userRequest.header("User-Agent") == null) { requestBuilder.header("User-Agent", USER_AGENT) }Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 4.2K bytes - Click Count (0) -
tests/test_tutorial/test_header_param_models/test_tutorial003.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 8.5K bytes - Click Count (0) -
tests/test_repeated_dependency_schema.py
from fastapi import Depends, FastAPI, Header, status from fastapi.testclient import TestClient app = FastAPI() def get_header(*, someheader: str = Header()): return someheader def get_something_else(*, someheader: str = Depends(get_header)): return f"{someheader}123" @app.get("/") def get_deps(dep1: str = Depends(get_header), dep2: str = Depends(get_something_else)): return {"dep1": dep1, "dep2": dep2}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Mar 06 12:18:57 GMT 2025 - 3.2K bytes - Click Count (0) -
tests/test_tutorial/test_handling_errors/test_tutorial002.py
def test_get_item_header(): response = client.get("/items-header/foo") assert response.status_code == 200, response.text assert response.json() == {"item": "The Foo Wrestlers"} def test_get_item_not_found_header(): response = client.get("/items-header/bar") assert response.status_code == 404, response.text assert response.headers.get("x-error") == "There goes my error"
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 3.3K bytes - Click Count (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)Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Wed Apr 09 14:28:39 GMT 2025 - 10.5K bytes - Click Count (0) -
tests/test_tutorial/test_response_directly/test_tutorial002.py
expected_content = """<?xml version="1.0"?> <shampoo> <Header> Apply shampoo here. </Header> <Body> You'll have to use soap here. </Body> </shampoo> """ response = client.get("/legacy/") assert response.status_code == 200, response.text assert response.headers["content-type"] == "application/xml" assert response.text == expected_contentCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 1.7K bytes - Click Count (0) -
fastapi/security/open_id_connect_url.py
return HTTPException( status_code=HTTP_401_UNAUTHORIZED, detail="Not authenticated", headers={"WWW-Authenticate": "Bearer"}, ) async def __call__(self, request: Request) -> Optional[str]: authorization = request.headers.get("Authorization") if not authorization: if self.auto_error: raise self.make_not_authenticated_error()
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 3.1K bytes - Click Count (0) -
fastapi/security/api_key.py
class APIKeyHeader(APIKeyBase): """ API key authentication using a header. This defines the name of the header that should be provided in the request with the API key and integrates that into the OpenAPI documentation. It extracts the key value sent in the header automatically and provides it as the dependency result. But it doesn't define how to send that key to the client.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 9.6K bytes - Click Count (1) -
samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt
assertThat(recorded.headers["Connection"]).isEqualTo("Upgrade, HTTP2-Settings") if (PlatformVersion.majorVersion < 19) { assertThat(recorded.headers["Content-Length"]).isEqualTo("0") } assertThat(recorded.headers["HTTP2-Settings"]).isNotNull() assertThat(recorded.headers["Upgrade"]).isEqualTo("h2c") // HTTP/2 over plaintext! assertThat(recorded.headers["User-Agent"]!!).matches(Regex("Java-http-client/.*"))
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Jun 18 12:28:21 GMT 2025 - 2.8K bytes - Click Count (0)