- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 1,063 for body (0.15 sec)
-
docs/pt/docs/tutorial/body-multiple-params.md
Plain Text - Registered: Sun Apr 14 07:19:09 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 6K bytes - Viewed (0) -
docs/pt/docs/tutorial/body-nested-models.md
### Defina um sub-modelo Por exemplo, nós podemos definir um modelo `Image`: ```Python hl_lines="9-11" {!../../../docs_src/body_nested_models/tutorial004.py!} ``` ### Use o sub-modelo como um tipo E então podemos usa-lo como o tipo de um atributo: ```Python hl_lines="20" {!../../../docs_src/body_nested_models/tutorial004.py!} ``` Isso significa que o **FastAPI** vai esperar um corpo similar à: ```JSON {
Plain Text - Registered: Sun Apr 14 07:19:09 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 7.4K bytes - Viewed (0) -
tests/test_multi_body_errors.py
app = FastAPI() class Item(BaseModel): name: str age: condecimal(gt=Decimal(0.0)) # type: ignore @app.post("/items/") def save_item_no_body(item: List[Item]): return {"item": item} client = TestClient(app) def test_put_correct_body(): response = client.post("/items/", json=[{"name": "Foo", "age": 5}]) assert response.status_code == 200, response.text assert response.json() == {
Python - Registered: Sun Apr 14 07:19:09 GMT 2024 - Last Modified: Sat Aug 19 18:47:59 GMT 2023 - 8K bytes - Viewed (0) -
tests/test_regex_deprecated_body.py
Python - Registered: Sun Apr 14 07:19:09 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 6.3K bytes - Viewed (0) -
tests/test_put_no_body.py
app = FastAPI() @app.put("/items/{item_id}") def save_item_no_body(item_id: str): return {"item_id": item_id} client = TestClient(app) def test_put_no_body(): response = client.put("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"item_id": "foo"} def test_put_no_body_with_body(): response = client.put("/items/foo", json={"name": "Foo"})
Python - Registered: Sun Apr 14 07:19:09 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.3K bytes - Viewed (0) -
tests/test_union_inherited_body.py
} }, }, }, "summary": "Save Union Different Body", "operationId": "save_union_different_body_items__post", "requestBody": { "content": { "application/json": { "schema": {
Python - Registered: Sun Apr 14 07:19:09 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 5.2K bytes - Viewed (0) -
tests/test_get_request_body.py
@app.get("/product") async def create_item(product: Product): return product client = TestClient(app) def test_get_with_body(): body = {"name": "Foo", "description": "Some description", "price": 5.5} response = client.request("GET", "/product", json=body) assert response.json() == body def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Python - Registered: Sun Apr 14 07:19:09 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.7K bytes - Viewed (0) -
tests/test_request_body_parameters_media_type.py
async def create_product(data: Product = Body(media_type=media_type, embed=True)): pass # pragma: no cover @app.post("/shops") async def create_shop( data: Shop = Body(media_type=media_type), included: typing.List[Product] = Body(default=[], media_type=media_type), ): pass # pragma: no cover client = TestClient(app) def test_openapi_schema(): response = client.get("/openapi.json")
Python - Registered: Sun Apr 14 07:19:09 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 6.4K bytes - Viewed (0) -
tests/test_response_code_no_body.py
Sebastián Ramírez <******@****.***> 1688149516 +0200
Python - Registered: Sun Apr 14 07:19:09 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
server.enqueue(MockResponse(body = "abc")) server.enqueue(MockResponse(body = "def")) // Call 1: set a deadline on the response body. val request1 = Request.Builder().url(server.url("/")).build() val response1 = client.newCall(request1).execute() val body1 = response1.body.source() assertThat(body1.readUtf8()).isEqualTo("abc") body1.timeout().deadline(5, TimeUnit.SECONDS)
Plain Text - Registered: Fri Apr 12 11:42:09 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 142.5K bytes - Viewed (0)