Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 1,327 for Responses (0.51 sec)

  1. tests/test_tutorial/test_request_files/test_tutorial002_an.py

        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<form" in response.content
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  2. tests/test_dependency_duplicates.py

        assert response.json() == [{"data": "myitem"}, {"data": "myitem"}]
    
    
    def test_sub_duplicates():
        response = client.post("/with-duplicates-sub", json={"data": "myitem"})
        assert response.status_code == 200, response.text
        assert response.json() == [
            {"data": "myitem"},
            [{"data": "myitem"}, {"data": "myitem"}],
        ]
    
    
    def test_openapi_schema():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_security/test_tutorial005_an_py39.py

        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    @needs_py39
    def test_no_token(client: TestClient):
        response = client.get("/users/me")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py39
    def test_token(client: TestClient):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_request_files/test_tutorial002_an_py39.py

        client = TestClient(app)
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<form" in response.content
    
    
    @needs_py39
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002_py39.py

    def test_create_item(client: TestClient) -> None:
        response = client.post("/items/", json={"name": "Foo"})
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "Foo", "description": None}
    
    
    @needs_py39
    def test_read_items(client: TestClient) -> None:
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [
            {
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Aug 25 19:10:22 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  6. docs/em/docs/advanced/path-operation-advanced-configuration.md

    โšซ๏ธ โœ”๏ธ ๐ŸŒ โ„น ๐Ÿ”ƒ *โžก ๐Ÿ› ๏ธ* &amp; โš™๏ธ ๐Ÿ— ๐Ÿง ๐Ÿงพ.
    
    โšซ๏ธ ๐Ÿ”Œ `tags`, `parameters`, `requestBody`, `responses`, โ™’๏ธ.
    
    ๐Ÿ‘‰ *โžก ๐Ÿ› ๏ธ*-๐ŸŽฏ ๐Ÿ—„ ๐Ÿ”— ๐Ÿ›Ž ๐Ÿ— ๐Ÿ” **FastAPI**, โœ‹๏ธ ๐Ÿ‘† ๐Ÿ’ช โ†” โšซ๏ธ.
    
    !!! tip
        ๐Ÿ‘‰ ๐Ÿ”… ๐ŸŽš โ†” โ˜.
    
        ๐Ÿšฅ ๐Ÿ‘† ๐Ÿ•ด ๐Ÿ’ช ๐Ÿ“ฃ ๐ŸŒ– ๐Ÿ“จ, ๐ŸŒ… ๐Ÿช ๐ŸŒŒ โšซ๏ธ โฎ๏ธ [๐ŸŒ– ๐Ÿ“จ ๐Ÿ—„](additional-responses.md){.internal-link target=_blank}.
    
    ๐Ÿ‘† ๐Ÿ’ช โ†” ๐Ÿ—„ ๐Ÿ”— *โžก ๐Ÿ› ๏ธ* โš™๏ธ ๐Ÿ”ข `openapi_extra`.
    
    ### ๐Ÿ—„ โ†”
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/handling-errors.md

    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    ```
    
    !!! note "๐Ÿ“ก โ„น"
        ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ `from starlette.requests import Request` &amp; `from starlette.responses import JSONResponse`.
    
        **FastAPI** ๐Ÿšš ๐ŸŽ `starlette.responses` `fastapi.responses` ๐Ÿช ๐Ÿ‘†, ๐Ÿ‘ฉโ€๐Ÿ’ป. โœ‹๏ธ ๐ŸŒ… ๐Ÿ’ช ๐Ÿ“จ ๐Ÿ‘Ÿ ๐Ÿ”— โšช๏ธโžก๏ธ ๐Ÿ’ƒ. ๐ŸŽ โฎ๏ธ `Request`.
    
    ## ๐Ÿ” ๐Ÿ”ข โš  ๐Ÿ•โ€๐Ÿฆบ
    
    **FastAPI** โœ”๏ธ ๐Ÿ”ข โš  ๐Ÿ•โ€๐Ÿฆบ.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 22 01:42:11 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  8. docs/fr/docs/advanced/path-operation-advanced-configuration.md

    Il inclut les `tags`, `parameters`, `requestBody`, `responses`, etc.
    
    Ce schรฉma OpenAPI spรฉcifique aux *operations* est normalement gรฉnรฉrรฉ automatiquement par **FastAPI**, mais vous pouvez รฉgalement l'รฉtendre.
    
    !!! tip "Astuce"
        Si vous avez seulement besoin de dรฉclarer des rรฉponses supplรฉmentaires, un moyen plus pratique de le faire est d'utiliser les [rรฉponses supplรฉmentaires dans OpenAPI](additional-responses.md){.internal-link target=_blank}.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 8K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_security/test_tutorial005.py

    
    def test_no_token():
        response = client.get("/users/me")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_token():
        access_token = get_access_token(scope="me")
        response = client.get(
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_request_files/test_tutorial001.py

        with path.open("rb") as file:
            response = client.post("/uploadfile/", files={"file": file})
        assert response.status_code == 200, response.text
        assert response.json() == {"filename": "test.txt"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.7K bytes
    - Viewed (0)
Back to top