std1.0.0-beta-7 SafeC docs

std :: http::static_files

Function std::http_serve_file

#include <std/http/static_files.h> source ยท definition

struct HttpResponse http_serve_file(
    const &HttpRequest req,
    const &char file_path,
    const ?&StaticOptions opts,
)

Serves the file at 'file_path' for 'req' (see the file comment). 404 if it doesn't exist or is a directory. 'opts' may be null (defaults()).