Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 1,327 for Responses (0.89 sec)

  1. tests/test_tutorial/test_request_files/test_tutorial001_an.py

            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.5K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_custom_response/test_tutorial006c.py

    client = TestClient(app)
    
    
    def test_redirect_status_code():
        response = client.get("/pydantic", follow_redirects=False)
        assert response.status_code == 302
        assert response.headers["location"] == "https://docs.pydantic.dev/"
    
    
    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: Fri Mar 22 01:42:11 UTC 2024
    - 899 bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/bigger-applications.md

    ✋️ 🔜 👆 💭 ❔ ⚫️ 👷, 👆 💪 ⚙️ ⚖ 🗄 👆 👍 📱 🙅‍♂ 🤔 ❔ 🏗 👫. 👶
    
    ### 🚮 🛃 `tags`, `responses`, & `dependencies`
    
    👥 🚫 ❎ 🔡 `/items` 🚫 `tags=["items"]` 🔠 *➡ 🛠️* ↩️ 👥 🚮 👫 `APIRouter`.
    
    ✋️ 👥 💪 🚮 _🌅_ `tags` 👈 🔜 ✔ 🎯 *➡ 🛠️*, & ➕ `responses` 🎯 👈 *➡ 🛠️*:
    
    ```Python hl_lines="30-31" title="app/routers/items.py"
    {!../../../docs_src/bigger_applications/app/routers/items.py!}
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/cli-runtime/artifacts/openapi/swagger-with-shared-parameters.json

              "type": "string"
            }
          },
          "required": [
            "expression"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 20 15:45:02 UTC 2024
    - 2.3M bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/bigger-applications.md

    ### Add some custom `tags`, `responses`, and `dependencies`
    
    We are not adding the prefix `/items` nor the `tags=["items"]` to each *path operation* because we added them to the `APIRouter`.
    
    But we can still add _more_ `tags` that will be applied to a specific *path operation*, and also some extra `responses` specific to that *path operation*:
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  6. pilot/pkg/features/xds.go

    		"If true, Pilot will cache XDS responses.").Get()
    
    	// EnableCDSCaching determines if CDS caching is enabled. This is explicitly split out of ENABLE_XDS_CACHE,
    	// so that in case there are issues with the CDS cache we can just disable the CDS cache.
    	EnableCDSCaching = env.Register("PILOT_ENABLE_CDS_CACHE", true,
    		"If true, Pilot will cache CDS responses. Note: this depends on PILOT_ENABLE_XDS_CACHE.").Get()
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Feb 24 06:18:36 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  7. docs/zh/docs/tutorial/handling-errors.md

    {"message": "Oops! yolo did something. There goes a rainbow..."}
    
    ```
    
    !!! note "技术细节"
    
        `from starlette.requests import Request` 和 `from starlette.responses import JSONResponse` 也可以用于导入 `Request` 和 `JSONResponse`。
    
        **FastAPI** 提供了与 `starlette.responses` 相同的 `fastapi.responses` 作为快捷方式,但大部分响应操作都可以直接从 Starlette 导入。同理,`Request` 也是如此。
    
    
    ## 覆盖默认异常处理器
    
    **FastAPI** 自带了一些默认异常处理器。
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 22 01:42:11 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/bigger-applications.md

    ### Einige benutzerdefinierte `tags`, `responses`, und `dependencies` hinzufügen
    
    Wir fügen weder das Präfix `/items` noch `tags=["items"]` zu jeder *Pfadoperation* hinzu, da wir sie zum `APIRouter` hinzugefügt haben.
    
    Aber wir können immer noch _mehr_ `tags` hinzufügen, die auf eine bestimmte *Pfadoperation* angewendet werden, sowie einige zusätzliche `responses`, die speziell für diese *Pfadoperation* gelten:
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 30 20:27:59 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  9. fastapi/applications.py

            ] = None,
            default_response_class: Annotated[
                Type[Response],
                Doc(
                    """
                    The default response class to be used.
    
                    Read more in the
                    [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#default-response-class).
    
                    **Example**
    
                    ```python
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat May 18 00:48:03 UTC 2024
    - 172.2K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_security/test_tutorial005_an.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)
Back to top