Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 145 for io (0.14 sec)

  1. docs/zh/docs/tutorial/middleware.md

        但是如果你想让浏览器中的客户端看到你的自定义请求头, 你需要把它们加到 CORS 配置 ([CORS (Cross-Origin Resource Sharing)](cors.md){.internal-link target=_blank}) 的 `expose_headers` 参数中,在 <a href="https://www.starlette.io/middleware/#corsmiddleware" class="external-link" target="_blank">Starlette's CORS docs</a>文档中.
    
    !!! note "技术细节"
        你也可以使用 `from starlette.requests import Request`.
    
        **FastAPI** 为了开发者方便提供了该对象. 但其实它直接来自于 Starlette.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 27 17:25:21 GMT 2021
    - 2.7K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/body-fields.md

        As these keys may not necessarily be part of the OpenAPI specification, some OpenAPI tools, for example [the OpenAPI validator](https://validator.swagger.io/), may not work with your generated schema.
    
    ## Recap
    
    You can use Pydantic's `Field` to declare extra validations and metadata for model attributes.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  3. docs/fr/docs/history-design-future.md

    Pendant le développement, j'ai également contribué à <a href="https://www.starlette.io/" class="external-link" target="_blank">**Starlette**</a>, l'autre exigence clé.
    
    ## Développement
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  4. docs/zh/docs/advanced/custom-request-and-route.md

        `Request` 的 `request.receive` 方法是**接收**请求体的函数。
    
        `scope` 字典与 `receive` 函数都是 ASGI 规范的内容。
    
        `scope` 与 `receive` 也是创建新的 `Request` 实例所需的。
    
        `Request` 的更多内容详见 <a href="https://www.starlette.io/requests/" class="external-link" target="_blank">Starlette 官档 - 请求</a>。
    
    `GzipRequest.get_route_handler` 返回函数的唯一区别是把 `Request` 转换成了 `GzipRequest`。
    
    如此一来,`GzipRequest` 把数据传递给*路径操作*前,就会解压数据(如需)。
    
    之后,所有处理逻辑都一样。
    
    Plain Text
    - Registered: Sun Mar 31 07:19:09 GMT 2024
    - Last Modified: Sat Mar 30 22:45:40 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/middleware.md

    !!! tip "豆知識"
        <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers" class="external-link" target="_blank">'X-'プレフィックスを使用</a>してカスタムの独自ヘッダーを追加できます。
    
        ただし、ブラウザのクライアントに表示させたいカスタムヘッダーがある場合は、<a href="https://www.starlette.io/middleware/#corsmiddleware" class="external-link" target="_blank">StarletteのCORSドキュメント</a>に記載されているパラメータ `expose_headers` を使用して、それらをCORS設定に追加する必要があります ([CORS (オリジン間リソース共有)](cors.md){.internal-link target=_blank})
    
    !!! note "技術詳細"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 3.8K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/testing.md

    # Testing
    
    Thanks to <a href="https://www.starlette.io/testclient/" class="external-link" target="_blank">Starlette</a>, testing **FastAPI** applications is easy and enjoyable.
    
    It is based on <a href="https://www.python-httpx.org" class="external-link" target="_blank">HTTPX</a>, which in turn is designed based on Requests, so it's very familiar and intuitive.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  7. docs/fr/docs/deployment/docker.md

    ![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png)
    
    ## Traefik
    
    <a href="https://traefik.io/" class="external-link" target="_blank">Traefik</a> est un reverse proxy/load balancer
    haute performance. Il peut faire office de "Proxy de terminaison TLS" (entre autres fonctionnalités).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 7.5K bytes
    - Viewed (0)
  8. docs/de/docs/advanced/openapi-callbacks.md

        Wenn Sie den Callback selbst implementieren, können Sie beispielsweise <a href="https://www.python-httpx.org" class="external-link" target="_blank">HTTPX</a> oder <a href="https://requests.readthedocs.io/" class="external-link" target="_blank">Requests</a> verwenden.
    
    ## Schreiben des Codes, der den Callback dokumentiert
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:17:23 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/handling-errors.md

    一般情况下可能不会需要在代码中直接使用响应头。
    
    但对于某些高级应用场景,还是需要添加自定义响应头:
    
    ```Python hl_lines="14"
    {!../../../docs_src/handling_errors/tutorial002.py!}
    
    ```
    
    ## 安装自定义异常处理器
    
    添加自定义处理器,要使用 [Starlette 的异常工具](https://www.starlette.io/exceptions/)。
    
    假设要触发的自定义异常叫作 `UnicornException`。
    
    且需要 FastAPI 实现全局处理该异常。
    
    此时,可以用 `@app.exception_handler()` 添加自定义异常控制器:
    
    ```Python hl_lines="5-7  13-18  24"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  10. docs/em/docs/advanced/openapi-callbacks.md

    👉 🖼 🚫 🛠️ ⏲ ⚫️ (👈 💪 ⏸ 📟), 🕴 🧾 🍕.
    
    !!! tip
        ☑ ⏲ 🇺🇸🔍 📨.
    
        🕐❔ 🛠️ ⏲ 👆, 👆 💪 ⚙️ 🕳 💖 <a href="https://www.python-httpx.org" class="external-link" target="_blank">🇸🇲</a> ⚖️ <a href="https://requests.readthedocs.io/" class="external-link" target="_blank">📨</a>.
    
    ## ✍ ⏲ 🧾 📟
    
    👉 📟 🏆 🚫 🛠️ 👆 📱, 👥 🕴 💪 ⚫️ *📄* ❔ 👈 *🔢 🛠️* 🔜 👀 💖.
    
    ✋️, 👆 ⏪ 💭 ❔ 💪 ✍ 🏧 🧾 🛠️ ⏮️ **FastAPI**.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 6.6K bytes
    - Viewed (0)
Back to top