16 #include <nlohmann/json.hpp>
28 virtual std::string
render(
const std::map<std::string, std::string>& context = {})
const = 0;
43 virtual std::string
render(
const nlohmann::json& context)
const {
virtual std::string render(const std::map< std::string, std::string > &context={}) const =0
Render the view body.
virtual std::string getContentType() const =0
Return the MIME content type for this view.
virtual ~FrameworkView()=default
virtual std::string render(const nlohmann::json &context) const
Optional JSON context hook (used by JsonView or convenience).
virtual void applyHeaders(HttpResponse &response) const
Optional hook to set response headers (e.g., Content-Disposition).
Represents an HTTP response object.