Expand description

Macros for creating static HTTP responders of varying media types from the frontend directory. Used to serve the testing frontend, which is all static files.

Macros

html 🔒
Wrapper for response using "text/html; charset=utf-8" as the Content-Type.
png 🔒
Wrapper for response using "image/png" as the Content-Type.
response 🔒
Http responder that returns the file at $path (relative to the “frontend” directory) as the body, using $content_type as the Content-Type header. Also serves ETags and responds appropriately, using hashes of the file contents, which are evaluated once on first access. The files are included using include_bytes, so they’re static throughout the program’s lifetime, and built into the server executable.