- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 578 for HEADERS (0.05 sec)
-
tests/test_tutorial/test_bigger_applications/test_main_an.py
response = client.get( "/items?token=jessica", headers={"X-Token": "fake-super-secret-token"} ) assert response.status_code == 200 assert response.json() == { "plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}, } def test_items_with_no_token_jessica(client: TestClient): response = client.get("/items", headers={"X-Token": "fake-super-secret-token"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 24.6K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial001_an_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) -
tests/test_tutorial/test_header_params/test_tutorial002_an_py39.py
{"strange-header": "Not really underscore"}, 200, {"strange_header": None}, ), ], ) def test(path, headers, expected_status, expected_response, client: TestClient): response = client.get(path, headers=headers) assert response.status_code == expected_status assert response.json() == expected_response @needs_py39 def test_openapi_schema():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.2K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial002_an.py
"/items", {"strange-header": "Not really underscore"}, 200, {"strange_header": None}, ), ], ) def test(path, headers, expected_status, expected_response): response = client.get(path, headers=headers) assert response.status_code == expected_status assert response.json() == expected_response def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
var headers: Headers = mockResponse.headers var trailers: Headers = mockResponse.trailers mockResponse = mockResponse.clearHeaders() mockResponse = mockResponse.addHeader("") mockResponse = mockResponse.addHeader("", "") mockResponse = mockResponse.addHeaderLenient("", Any()) mockResponse = mockResponse.setHeader("", Any()) mockResponse.headers = headersOf()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RecordedResponse.kt
} fun assertHeader( name: String, vararg values: String?, ) = apply { assertThat(response!!.headers(name)).containsExactly(*values) } fun assertHeaders(headers: Headers) = apply { assertThat(response!!.headers).isEqualTo(headers) } fun assertBody(expectedBody: String) = apply { assertThat(body).isEqualTo(expectedBody) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.3K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003_an_py39.py
@needs_py39 @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/sts/client_grants/__init__.py
method = self.METHOD def fetch_credentials(): # HTTP headers are case insensitive filter out # all duplicate headers and pick one. headers = {} headers['content-type'] = 'application/x-www-form-urlencoded' headers['authorization'] = urllib3.make_headers( basic_auth='%s:%s' % (self.cid, self.csec))['authorization']
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 4.6K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial002_an_py310.py
{"strange-header": "Not really underscore"}, 200, {"strange_header": None}, ), ], ) def test(path, headers, expected_status, expected_response, client: TestClient): response = client.get(path, headers=headers) assert response.status_code == expected_status assert response.json() == expected_response @needs_py310 def test_openapi_schema(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.2K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003_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)