- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 142 for host (0.14 sec)
-
docs_src/app_testing/app_b/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/",
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 1.8K bytes - Viewed (0) -
docs/en/docs/fastapi-people.md
A round of applause to them. 👏 🙇 ## FastAPI Experts These are the users that have been [helping others the most with questions in GitHub](help-fastapi.md#help-others-with-questions-in-github){.internal-link target=_blank}. 🙇 They have proven to be **FastAPI Experts** by helping many others. ✨ !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 16 23:54:24 GMT 2024 - 8.7K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial001_an.py
"description": None, "tax": None, }, "q": "bar", } def test_post_no_body_q_bar(client: TestClient): response = client.put("/items/5?q=bar", json=None) assert response.status_code == 200 assert response.json() == {"item_id": 5, "q": "bar"} def test_post_no_body(client: TestClient): response = client.put("/items/5", json=None) assert response.status_code == 200
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.5K bytes - Viewed (0) -
tests/test_tutorial/test_openapi_webhooks/test_tutorial001.py
"new-subscription": { "post": { "summary": "New Subscription", "description": "When a new user subscribes to your service we'll send you a POST request with this\ndata to the URL that you register for the event `new-subscription` in the dashboard.", "operationId": "new_subscriptionnew_subscription_post", "requestBody": {
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Oct 20 09:00:44 GMT 2023 - 4.4K bytes - Viewed (2) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002_py310.py
} }, } }, }, "post": { "summary": "Create Item", "operationId": "create_item_items__post", "requestBody": { "content": { "application/json": {
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Aug 25 19:10:22 GMT 2023 - 4.9K bytes - Viewed (0) -
tests/test_response_model_data_filter_no_inheritance.py
class User(BaseModel): email: str class PetDB(BaseModel): name: str owner: UserDB class PetOut(BaseModel): name: str owner: User @app.post("/users/", response_model=User) async def create_user(user: UserCreate): return user @app.get("/pets/{pet_id}", response_model=PetOut) async def read_pet(pet_id: int): user = UserDB(
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 1.7K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial003.py
from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.body_multiple_params.tutorial003 import app client = TestClient(app) return client def test_post_body_valid(client: TestClient): response = client.put( "/items/5", json={ "importance": 2, "item": {"name": "Foo", "price": 50.5}, "user": {"username": "Dave"},
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 9.4K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial003_an.py
@pytest.fixture(name="client") def get_client(): from docs_src.body_multiple_params.tutorial003_an import app client = TestClient(app) return client def test_post_body_valid(client: TestClient): response = client.put( "/items/5", json={ "importance": 2, "item": {"name": "Foo", "price": 50.5}, "user": {"username": "Dave"},
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 9.4K bytes - Viewed (2) -
docs/zh/docs/tutorial/request-forms.md
但包含文件的表单编码为 `multipart/form-data`。文件处理详见下节。 编码和表单字段详见 <a href="https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Methods/POST" class="external-link" target="_blank"><abbr title="Mozilla Developer Network">MDN</abbr> Web 文档的 <code>POST</code></a>小节。 !!! warning "警告" 可在一个*路径操作*中声明多个 `Form` 参数,但不能同时声明要接收 JSON 的 `Body` 字段。因为此时请求体的编码是 `application/x-www-form-urlencoded`,不是 `application/json`。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 2.2K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial003_py310.py
@pytest.fixture(name="client") def get_client(): from docs_src.body_multiple_params.tutorial003_py310 import app client = TestClient(app) return client @needs_py310 def test_post_body_valid(client: TestClient): response = client.put( "/items/5", json={ "importance": 2, "item": {"name": "Foo", "price": 50.5}, "user": {"username": "Dave"},
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 9.5K bytes - Viewed (0)