- Sort Score
- Num 10 results
- Language All
Results 331 - 340 of 1,838 for RESPONSE (0.05 seconds)
-
samples/guide/src/main/java/okhttp3/recipes/PostFile.java
.post(RequestBody.create(file, MEDIA_TYPE_MARKDOWN)) .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); System.out.println(response.body().string()); } } public static void main(String... args) throws Exception { new PostFile().run(); }
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat May 25 18:02:55 GMT 2019 - 1.5K bytes - Click Count (0) -
tests/test_validate_response.py
def test_valid_none_data(): response = client.get("/items/validnone") data = response.json() assert response.status_code == 200 assert data == {"name": "invalid", "price": 3.2, "owner_ids": None} def test_valid_none_none(): response = client.get("/items/validnone", params={"send_none": "true"}) data = response.json() assert response.status_code == 200 assert data is None
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 2K bytes - Click Count (0) -
tests/test_tutorial/test_cors/test_tutorial001.py
) assert response.headers["access-control-allow-headers"] == "X-Example" # Test standard response headers = {"Origin": "https://localhost.tiangolo.com"} response = client.get("/", headers=headers) assert response.status_code == 200, response.text assert response.json() == {"message": "Hello World"} assert ( response.headers["access-control-allow-origin"]Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.3K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/net/NetShareEnumResponseTest.java
field.setAccessible(true); return field.getInt(response); } private void setStatus(NetShareEnumResponse response, int value) throws Exception { Method method = getSuperclassMethod(response.getClass(), "setStatus", int.class); method.setAccessible(true); method.invoke(response, value); }
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 20.2K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/suggest/request/popularwords/PopularWordsResponseTest.java
PopularWordsResponse response = new PopularWordsResponse("test-index", 100, words, 10, items); assertNotNull(response); assertEquals("test-index", response.getIndex()); assertEquals(100, response.getTookMs()); assertEquals(2, response.getNum()); assertEquals(10, response.getTotal()); assertEquals(2, response.getWords().size());Created: Sat Dec 20 13:04:59 GMT 2025 - Last Modified: Thu Nov 13 00:40:54 GMT 2025 - 5.6K bytes - Click Count (0) -
tests/test_security_http_digest.py
def test_security_http_digest(): response = client.get("/users/me", headers={"Authorization": "Digest foobar"}) assert response.status_code == 200, response.text assert response.json() == {"scheme": "Digest", "credentials": "foobar"} def test_security_http_digest_no_credentials(): response = client.get("/users/me") assert response.status_code == 401, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2.1K bytes - Click Count (0) -
tests/test_request_params/test_header/test_required_str.py
"/required-alias", "/model-required-alias", ], ) def test_required_alias_by_alias(path: str): client = TestClient(app) response = client.get(path, headers={"p_alias": "hello"}) assert response.status_code == 200, response.text assert response.json() == {"p": "hello"} # ===================================================================================== # Validation aliasCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 10K bytes - Click Count (0) -
tests/test_read_with_orm_mode.py
return db_person client = TestClient(app) person_data = {"name": "Dive", "lastname": "Wilson"} response = client.post("/people/", json=person_data) data = response.json() assert response.status_code == 200, response.text assert data["name"] == person_data["name"] assert data["lastname"] == person_data["lastname"]Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 1.2K bytes - Click Count (0) -
tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py
client = TestClient(mod.app) return client def test_endpoint_works(client: TestClient): response = client.post("/", json=[1, 2, 3]) assert response.json() == 6 def test_exception_handler_body_access(client: TestClient): response = client.post("/", json={"numbers": [1, 2, 3]}) assert response.json() == { "detail": { "errors": [ {Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 1.3K bytes - Click Count (0) -
tests/test_request_params/test_file/test_optional_list.py
client = TestClient(app) response = client.post(path) assert response.status_code == 200, response.text assert response.json() == {"file_size": None} @pytest.mark.parametrize( "path", [ "/optional-list-bytes", "/optional-list-uploadfile", ], ) def test_optional_list(path: str): client = TestClient(app)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 10.4K bytes - Click Count (0)