Struct StaticAsset

Struct Documentation

struct StaticAsset

Response shape returned by RouteRegistry::static_asset handlers. Used for serving small bundled assets - HTML, JS, CSS, images - whose content is already in memory.

Public Members

std::vector<std::uint8_t> bytes

Asset bytes (already in memory).

std::string content_type

MIME type (e.g. text/html; charset=utf-8, application/javascript).

std::vector<std::pair<std::string, std::string>> headers

Optional extra headers (Cache-Control, ETag, etc.).