29 std::string
render(
const std::map<std::string, std::string>& context = {})
const override;
Abstract base class for all views in the PicoFramework.
Defines the HttpRequest class for handling HTTP requests: headers, method, path, query string,...
HTTP HttpResponse class for managing status, headers, body, and streaming support.
std::string getContentType() const override
Return the MIME content type for this view.
std::string templateSource_
void render(HttpRequest &req, HttpResponse &res)
std::string render(const std::map< std::string, std::string > &context={}) const override
Render the view body.
Forward declaration for potential routing needs.
Represents an HTTP response object.
HttpResponse & setContentType(const std::string &content_type)
Set the Content-Type header.
void send(const std::string &body)
Send a full response including headers and body.