Open
Description
This seems like generic enough functionality it could make sense to put in HTTP.jl. I don't have an api figured out, but just as a placeholder/starting point
# ?serve_file
# serve_file(path; mimetype="infer", extension="infer", ...) :: HTTP.Response
# serve_file(stream::HTTP.Stream, ...) :: Nothing
using HTTP
function handle_file(req::HTTP.Request)
return HTTP.serve_file("file.txt")
end
Some pointers to other implementations