fastapi/docs/en/docs/reference/response.md

14 lines
397 B
Markdown

# `Response` class
You can declare a parameter in a *path operation function* or dependency to be of type `Response` and then you can set data for the response like headers or cookies.
You can also use it directly to create an instance of it and return it from your *path operations*.
You can import it directly from `fastapi`:
```python
from fastapi import Response
```
::: fastapi.Response