Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add baize.asgi.FileResponse to docs #1696

Merged
merged 1 commit into from Jun 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/responses.md
Expand Up @@ -188,3 +188,7 @@ async def app(scope, receive, send):
#### [EventSourceResponse](https://github.com/sysid/sse-starlette)

A response class that implements [Server-Sent Events](https://html.spec.whatwg.org/multipage/server-sent-events.html). It enables event streaming from the server to the client without the complexity of websockets.

#### [baize.asgi.FileResponse](https://baize.aber.sh/asgi#fileresponse)

As a smooth replacement for Starlette [`FileResponse`](https://www.starlette.io/responses/#fileresponse), it will automatically handle [Head method](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Methods/HEAD) and [Range requests](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Range_requests).