From: Aber Date: Thu, 16 Jun 2022 18:37:43 +0000 (+0800) Subject: Add baize.asgi.FileResponse to docs (#1696) X-Git-Tag: 0.20.4~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f958007dceb67a72b6c80b96df4be3c51845864d;p=thirdparty%2Fstarlette.git Add baize.asgi.FileResponse to docs (#1696) --- diff --git a/docs/responses.md b/docs/responses.md index ce91f7ff..72cc32b0 100644 --- a/docs/responses.md +++ b/docs/responses.md @@ -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).