StaticView sends a fixed HTML string with no template substitution. More...
#include <StaticView.h>
Public Member Functions | |
StaticView (const char *html) | |
std::string | render (const std::map< std::string, std::string > &={}) const override |
Render the view body. | |
std::string | getContentType () const override |
Return the MIME content type for this view. | |
![]() | |
virtual | ~FrameworkView ()=default |
virtual void | applyHeaders (HttpResponse &response) const |
Optional hook to set response headers (e.g., Content-Disposition). | |
virtual std::string | render (const nlohmann::json &context) const |
Optional JSON context hook (used by JsonView or convenience). | |
Private Attributes | |
const char * | html_ |
Definition at line 12 of file StaticView.h.
|
inlineexplicit |
Definition at line 15 of file StaticView.h.
|
inlineoverridevirtual |
Implements FrameworkView.
Definition at line 22 of file StaticView.h.
|
inlineoverridevirtual |
Optional context (used by templates).
Implements FrameworkView.
Definition at line 17 of file StaticView.h.
|
private |
Definition at line 28 of file StaticView.h.