fileResponse

Convenience method to send a file response to a request.

fileResponse
(
string filename
,
string type
)

Parameters

filename string

The filename to send.

type string

The mime type to send, such as "text/html; charset=utf-8"

Return Value

A 200 OK response whose body is the contents of the file that was specified, or 404 Not Found if the file could not be found.

Meta