- Sort Score
- Result 10 results
- Languages All
Results 161 - 170 of 1,224 for header1 (0.05 sec)
-
tests/test_param_include_in_schema.py
], ) def test_hidden_header(path, headers, expected_status, expected_response): client = TestClient(app) response = client.get(path, headers=headers) assert response.status_code == expected_status assert response.json() == expected_response def test_hidden_path(): client = TestClient(app) response = client.get("/hidden_path/hidden_path") assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 7.4K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003_an.py
@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"]}), ], ) 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 - 4.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CookiesTest.kt
.build() get(redirectSourceUrl) val request = redirectSource.takeRequest() assertThat(request.headers["Cookie"]).isEqualTo("c=cookie") for (header in redirectTarget.takeRequest().headers.names()) { if (header.startsWith("Cookie")) { fail(header) } } } @Test fun testCookiesSentIgnoresCase() { client = client.newBuilder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13K 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) -
okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt
userResponse: Response, defaultDelay: Int, ): Int { val header = userResponse.header("Retry-After") ?: return defaultDelay // https://tools.ietf.org/html/rfc7231#section-7.1.3 // currently ignores a HTTP-date, and assumes any non int 0 is a delay if (header.matches("\\d+".toRegex())) { return Integer.valueOf(header) } return Integer.MAX_VALUE } companion object {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 12.1K bytes - Viewed (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"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.3K bytes - Viewed (0) -
docs_src/header_param_models/tutorial002_py310.py
from fastapi import FastAPI, Header from pydantic import BaseModel app = FastAPI() class CommonHeaders(BaseModel): model_config = {"extra": "forbid"} 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: CommonHeaders = Header()):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 392 bytes - Viewed (0) -
docs_src/header_param_models/tutorial002_pv1_py310.py
from fastapi import FastAPI, Header from pydantic import BaseModel app = FastAPI() class CommonHeaders(BaseModel): class Config: extra = "forbid" 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: CommonHeaders = Header()):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 396 bytes - Viewed (0) -
internal/bucket/object/lock/lock.go
// IsObjectLockGovernanceBypassSet returns true if object lock governance bypass header is set. func IsObjectLockGovernanceBypassSet(h http.Header) bool { return strings.EqualFold(h.Get(AmzObjectLockBypassRetGovernance), "true") } // IsObjectLockRequested returns true if legal hold or object lock retention headers are requested. func IsObjectLockRequested(h http.Header) bool {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jun 29 01:20:27 UTC 2024 - 17.1K bytes - Viewed (0) -
docs_src/header_param_models/tutorial002_an_py310.py
from fastapi import FastAPI, Header from pydantic import BaseModel app = FastAPI() class CommonHeaders(BaseModel): model_config = {"extra": "forbid"} 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 - 432 bytes - Viewed (0)