-
Notifications
You must be signed in to change notification settings - Fork 1
FileResponse
ricardoboss edited this page Nov 19, 2023
·
1 revision
Reads the file contents and returns a map that can be returned from a httpServer
request handler.
fileResponse(string path)
-
path
is the path to the file to read.
- If the file does not exist, a 404 response with an empty body is returned.
httpServer(8080, (map request) {
return fileResponse("./index.html")
})
© 2023 Ricardo Boss • Licensed under MIT • Want to update this page? Edit it on GitHub and submit a pull request!