Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 20 for PlainTextResponse (0.11 sec)

  1. docs/ru/docs/tutorial/handling-errors.md

    ```Python hl_lines="3-4  9-11  22"
    {!../../docs_src/handling_errors/tutorial004.py!}
    ```
    
    /// note | "Технические детали"
    
    Можно также использовать `from starlette.responses import PlainTextResponse`.
    
    **FastAPI** предоставляет тот же `starlette.responses`, что и `fastapi.responses`, просто для удобства разработчика. Однако большинство доступных ответов поступает непосредственно из Starlette.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/handling-errors.md

    ```Python hl_lines="3-4  9-11  22"
    {!../../docs_src/handling_errors/tutorial004.py!}
    ```
    
    /// note | "Technical Details"
    
    You could also use `from starlette.responses import PlainTextResponse`.
    
    **FastAPI** provides the same `starlette.responses` as `fastapi.responses` just as a convenience for you, the developer. But most of the available responses come directly from Starlette.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/handling-errors.md

    ```Python hl_lines="3-4  9-11  22"
    {!../../docs_src/handling_errors/tutorial004.py!}
    ```
    
    /// note | "Detalhes Técnicos"
    
    Você pode usar `from starlette.responses import PlainTextResponse`.
    
    **FastAPI** disponibiliza o mesmo `starlette.responses` como `fastapi.responses`, como conveniência a você, desenvolvedor. Contudo, a maior parte das respostas disponíveis vem diretamente do Starlette.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/handling-errors.md

    ```Python hl_lines="3-4  9-11  22"
    {!../../docs_src/handling_errors/tutorial004.py!}
    ```
    
    /// note | "Technische Details"
    
    Sie können auch `from starlette.responses import PlainTextResponse` verwenden.
    
    **FastAPI** bietet dieselben `starlette.responses` auch via `fastapi.responses` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Responses kommen aber direkt von Starlette.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  5. docs/zh/docs/advanced/custom-response.md

    
    ```Python hl_lines="1  18"
    {!../../docs_src/response_directly/tutorial002.py!}
    ```
    
    ### `HTMLResponse`
    
    如上文所述,接受文本或字节并返回 HTML 响应。
    
    ### `PlainTextResponse`
    
    接受文本或字节并返回纯文本响应。
    
    ```Python hl_lines="2  7  9"
    {!../../docs_src/custom_response/tutorial005.py!}
    ```
    
    ### `JSONResponse`
    
    接受数据并返回一个 `application/json` 编码的响应。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/handling-errors.md

    例如,只为错误返回纯文本响应,而不是返回 JSON 格式的内容:
    
    ```Python hl_lines="3-4  9-11  22"
    {!../../docs_src/handling_errors/tutorial004.py!}
    
    ```
    
    /// note | "技术细节"
    
    还可以使用 `from starlette.responses import PlainTextResponse`。
    
    **FastAPI** 提供了与 `starlette.responses` 相同的 `fastapi.responses` 作为快捷方式,但大部分响应都可以直接从 Starlette 导入。
    
    ///
    
    ### 使用 `RequestValidationError` 的请求体
    
    `RequestValidationError` 包含其接收到的无效数据请求的 `body` 。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  7. docs/de/docs/advanced/custom-response.md

    ```Python hl_lines="1  18"
    {!../../docs_src/response_directly/tutorial002.py!}
    ```
    
    ### `HTMLResponse`
    
    Nimmt Text oder Bytes entgegen und gibt eine HTML-Response zurück, wie Sie oben gelesen haben.
    
    ### `PlainTextResponse`
    
    Nimmt Text oder Bytes entgegen und gibt eine Plain-Text-Response zurück.
    
    ```Python hl_lines="2  7  9"
    {!../../docs_src/custom_response/tutorial005.py!}
    ```
    
    ### `JSONResponse`
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  8. docs/pt/docs/advanced/custom-response.md

    ```Python hl_lines="1  18"
    {!../../docs_src/response_directly/tutorial002.py!}
    ```
    
    ### `HTMLResponse`
    
    Usa algum texto ou sequência de bytes e retorna uma resposta HTML. Como você leu acima.
    
    ### `PlainTextResponse`
    
    Usa algum texto ou sequência de bytes para retornar uma resposta de texto não formatado.
    
    ```Python hl_lines="2  7  9"
    {!../../docs_src/custom_response/tutorial005.py!}
    ```
    
    ### `JSONResponse`
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 29 11:47:10 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/custom-response.md

    ```Python hl_lines="1  18"
    {!../../docs_src/response_directly/tutorial002.py!}
    ```
    
    ### `HTMLResponse`
    
    Takes some text or bytes and returns an HTML response, as you read above.
    
    ### `PlainTextResponse`
    
    Takes some text or bytes and returns a plain text response.
    
    ```Python hl_lines="2  7  9"
    {!../../docs_src/custom_response/tutorial005.py!}
    ```
    
    ### `JSONResponse`
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 12K bytes
    - Viewed (0)
  10. docs/ja/docs/tutorial/handling-errors.md

    例えば、これらのエラーに対しては、JSONではなくプレーンテキストを返すようにすることができます:
    
    ```Python hl_lines="3 4  9 10 11 22"
    {!../../docs_src/handling_errors/tutorial004.py!}
    ```
    
    /// note | "技術詳細"
    
    また、`from starlette.responses import PlainTextResponse`を使用することもできます。
    
    **FastAPI** は開発者の利便性を考慮して、`fastapi.responses`と同じ`starlette.responses`を提供しています。しかし、利用可能なレスポンスのほとんどはStarletteから直接提供されます。
    
    ///
    
    ### `RequestValidationError`のボディの使用
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.8K bytes
    - Viewed (0)
Back to top