- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 1,708 for Post (0.02 sec)
-
docs_src/openapi_callbacks/tutorial001.py
class InvoiceEventReceived(BaseModel): ok: bool invoices_callback_router = APIRouter() @invoices_callback_router.post( "{$callback_url}/invoices/{$request.body.id}", response_model=InvoiceEventReceived ) def invoice_notification(body: InvoiceEvent): pass @app.post("/invoices/", callbacks=invoices_callback_router.routes) def create_invoice(invoice: Invoice, callback_url: Union[HttpUrl, None] = None): """
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 1.3K bytes - Viewed (0) -
tests/test_read_with_orm_mode.py
app = FastAPI() @app.post("/people/", response_model=PersonRead) def create_person(person: PersonCreate) -> Any: db_person = Person.model_validate(person) return db_person client = TestClient(app) person_data = {"name": "Dive", "lastname": "Wilson"} response = client.post("/people/", json=person_data) data = response.json()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2.4K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial002_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/relatedquery/ApiAdminRelatedqueryAction.java
return null; }); return asJson(new ApiUpdateResponse().id(relatedQuery.getId()).created(true).status(Status.OK).result()); } // POST /api/admin/relatedquery/setting @Execute public JsonResponse<ApiResult> post$setting(final EditBody body) { validateApi(body, messages -> {}); body.crudMode = CrudMode.EDIT;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 6.6K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial003_py39.py
path2 = tmp_path / "test2.txt" path2.write_bytes(b"<file content2>") client = TestClient(app) with path.open("rb") as file, path2.open("rb") as file2: response = client.post( "/files/", files=( ("files", ("test.txt", file)), ("files", ("test2.txt", file2)), ), ) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.6K bytes - Viewed (0) -
tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.openapi_callbacks.tutorial001 import app, invoice_notification client = TestClient(app) def test_get(): response = client.post( "/invoices/", json={"id": "fooinvoice", "customer": "John", "total": 5.3} ) assert response.status_code == 200, response.text assert response.json() == {"msg": "Invoice received"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 9K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/guide/PostExample.java
final OkHttpClient client = new OkHttpClient(); String post(String url, String json) throws IOException { RequestBody body = RequestBody.create(json, JSON); Request request = new Request.Builder() .url(url) .post(body) .build(); try (Response response = client.newCall(request).execute()) { return response.body().string(); }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 2K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an.py
return app @pytest.fixture(name="client") def get_client(app: FastAPI): client = TestClient(app) return client def test_post_form_no_body(client: TestClient): response = client.post("/files/") assert response.status_code == 422, response.text assert response.json() == IsDict( { "detail": [ { "type": "missing",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.8K bytes - Viewed (0) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt
* * Example: * ``` * --> POST /greeting http/1.1 (3-byte body) * * <-- 200 OK (22ms, 6-byte body) * ``` */ BASIC, /** * Logs request and response lines and their respective headers. * * Example: * ``` * --> POST /greeting http/1.1 * Host: example.com * Content-Type: plain/text
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 09:14:38 UTC 2024 - 11.2K bytes - Viewed (0) -
docs_src/app_testing/app_b_py310/test_main.py
def test_create_item_bad_token(): response = client.post( "/items/", headers={"X-Token": "hailhydra"}, json={"id": "bazz", "title": "Bazz", "description": "Drop the bazz"}, ) assert response.status_code == 400 assert response.json() == {"detail": "Invalid X-Token header"} def test_create_existing_item(): response = client.post( "/items/",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 1.8K bytes - Viewed (0)