diff options
Diffstat (limited to 'std/http/file_server.ts')
-rw-r--r-- | std/http/file_server.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/std/http/file_server.ts b/std/http/file_server.ts index b75f9f9c1..331dbe5c5 100644 --- a/std/http/file_server.ts +++ b/std/http/file_server.ts @@ -112,6 +112,11 @@ function fileLenToString(len: number): string { return `${(len / base).toFixed(2)}${suffix[suffixIndex]}`; } +/** + * Returns an HTTP Response with the requested file as the body + * @param req The server request context used to cleanup the file handle + * @param filePath Path of the file to serve + */ export async function serveFile( req: ServerRequest, filePath: string, |