]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Add baize.asgi.FileResponse to docs (#1696)
authorAber <me@abersheeran.com>
Thu, 16 Jun 2022 18:37:43 +0000 (02:37 +0800)
committerGitHub <noreply@github.com>
Thu, 16 Jun 2022 18:37:43 +0000 (11:37 -0700)
docs/responses.md

index ce91f7ffabd031e75a1c0dc19d4ab0e41eff7eb8..72cc32b046912e76e98889effb707d95c3804cd3 100644 (file)
@@ -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).