- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 740 for haddrs (0.07 sec)
-
cmd/object-api-options_test.go
ctx := context.Background() testCases := []struct { name string headers http.Header wantObjectAttrs map[string]struct{} }{ { name: "empty header", headers: http.Header{}, wantObjectAttrs: map[string]struct{}{}, }, { name: "single header line", headers: http.Header{ xhttp.AmzObjectAttributes: []string{"test1,test2"}, },
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 21 21:13:59 UTC 2024 - 2.4K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003_an_py310.py
@needs_py310 @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"]}), ], )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.3K bytes - Viewed (0) -
docs/features/interceptors.md
} ``` ### Rewriting Responses Symmetrically, interceptors can rewrite response headers and transform the response body. This is generally more dangerous than rewriting request headers because it may violate the webserver's expectations!
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 8.1K bytes - Viewed (0) -
internal/handlers/proxy.go
} // Default to remote address if headers not set. raddr, _, _ := net.SplitHostPort(addr) if raddr == "" { return addr } return raddr } // GetSourceIP retrieves the IP from the request headers // and falls back to r.RemoteAddr when necessary. func GetSourceIP(r *http.Request) string { addr := GetSourceIPRaw(r) if strings.ContainsRune(addr, ':') { return "[" + addr + "]" }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Dec 22 00:56:55 UTC 2023 - 5.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/internal.kt
forObsoleteRfc2965: Boolean, ): String = cookie.toString(forObsoleteRfc2965) internal fun addHeaderLenient( builder: Headers.Builder, line: String, ): Headers.Builder = builder.addLenient(line) internal fun addHeaderLenient( builder: Headers.Builder, name: String, value: String, ): Headers.Builder = builder.addLenient(name, value) internal fun cacheGet( cache: Cache, request: Request,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.7K bytes - Viewed (0) -
docs/recipes.md
each other, corrupt the response cache, and possibly crash your program. Response caching uses HTTP headers for all configuration. You can add request headers like `Cache-Control: max-stale=3600` and OkHttp's cache will honor them. Your webserver configures how long responses are cached with its own response headers, like `Cache-Control: max-age=9600`. There are cache headers to force a cached response, force a network response, or force the network response to be validated with a conditional...
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Feb 18 08:52:22 UTC 2022 - 40.2K bytes - Viewed (0) -
docs_src/header_param_models/tutorial002_pv1_an_py310.py
host: str save_data: bool if_modified_since: str | None = None traceparent: str | None = None x_tag: list[str] = [] @app.get("/items/") async def read_items(headers: Annotated[CommonHeaders, Header()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 436 bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial012.py
} ) def test_get_invalid_one_header_items(): response = client.get("/items/", headers={"X-Token": "invalid"}) assert response.status_code == 400, response.text assert response.json() == {"detail": "X-Token header invalid"} def test_get_invalid_one_users(): response = client.get("/users/", headers={"X-Token": "invalid"}) assert response.status_code == 400, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 8.4K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial001_an_py39.py
assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py39 def test_token(client: TestClient): response = client.get("/items", headers={"Authorization": "Bearer testtoken"}) assert response.status_code == 200, response.text assert response.json() == {"token": "testtoken"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
docs/features/calls.md
Each HTTP request contains a URL, a method (like `GET` or `POST`), and a list of headers. Requests may also contain a body: a data stream of a specific content type. ## [Responses](https://square.github.io/okhttp/4.x/okhttp/okhttp3/-response/) The response answers the request with a code (like 200 for success or 404 for not found), headers, and its own optional body. ## Rewriting Requests
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 3.9K bytes - Viewed (0)