Browse Source

🌐 Add German translation for `docs/de/docs/reference/responses.md` (#10825)

pull/11176/head
Nils Lindemann 1 year ago
committed by GitHub
parent
commit
646e7eb3c7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 164
      docs/de/docs/reference/responses.md

164
docs/de/docs/reference/responses.md

@ -0,0 +1,164 @@
# Benutzerdefinierte Responseklassen – File, HTML, Redirect, Streaming, usw.
Es gibt mehrere benutzerdefinierte Responseklassen, von denen Sie eine Instanz erstellen und diese direkt von Ihren *Pfadoperationen* zurückgeben können.
Lesen Sie mehr darüber in der [FastAPI-Dokumentation zu benutzerdefinierten Responses – HTML, Stream, Datei, andere](../advanced/custom-response.md).
Sie können diese direkt von `fastapi.responses` importieren:
```python
from fastapi.responses import (
FileResponse,
HTMLResponse,
JSONResponse,
ORJSONResponse,
PlainTextResponse,
RedirectResponse,
Response,
StreamingResponse,
UJSONResponse,
)
```
## FastAPI-Responses
Es gibt einige benutzerdefinierte FastAPI-Responseklassen, welche Sie verwenden können, um die JSON-Performanz zu optimieren.
::: fastapi.responses.UJSONResponse
options:
members:
- charset
- status_code
- media_type
- body
- background
- raw_headers
- render
- init_headers
- headers
- set_cookie
- delete_cookie
::: fastapi.responses.ORJSONResponse
options:
members:
- charset
- status_code
- media_type
- body
- background
- raw_headers
- render
- init_headers
- headers
- set_cookie
- delete_cookie
## Starlette-Responses
::: fastapi.responses.FileResponse
options:
members:
- chunk_size
- charset
- status_code
- media_type
- body
- background
- raw_headers
- render
- init_headers
- headers
- set_cookie
- delete_cookie
::: fastapi.responses.HTMLResponse
options:
members:
- charset
- status_code
- media_type
- body
- background
- raw_headers
- render
- init_headers
- headers
- set_cookie
- delete_cookie
::: fastapi.responses.JSONResponse
options:
members:
- charset
- status_code
- media_type
- body
- background
- raw_headers
- render
- init_headers
- headers
- set_cookie
- delete_cookie
::: fastapi.responses.PlainTextResponse
options:
members:
- charset
- status_code
- media_type
- body
- background
- raw_headers
- render
- init_headers
- headers
- set_cookie
- delete_cookie
::: fastapi.responses.RedirectResponse
options:
members:
- charset
- status_code
- media_type
- body
- background
- raw_headers
- render
- init_headers
- headers
- set_cookie
- delete_cookie
::: fastapi.responses.Response
options:
members:
- charset
- status_code
- media_type
- body
- background
- raw_headers
- render
- init_headers
- headers
- set_cookie
- delete_cookie
::: fastapi.responses.StreamingResponse
options:
members:
- body_iterator
- charset
- status_code
- media_type
- body
- background
- raw_headers
- render
- init_headers
- headers
- set_cookie
- delete_cookie
Loading…
Cancel
Save