#include "static-files.h" #include using namespace std::string_literals; std::string static_files_plugin::name() { return "static-files"; } static_files_plugin::static_files_plugin() { //std::cout << "Plugin constructor" << std::endl; } static_files_plugin::~static_files_plugin() { //std::cout << "Plugin destructor" << std::endl; } std::string static_files_plugin::generate_page( std::function& GetServerParam, std::function& GetRequestParam, // request including body (POST...) std::function& SetResponseHeader // to be added to result string ) { try { return "Static Files "s + GetServerParam("path"s); } catch (const std::exception& ex) { return "Error: "s + ex.what(); } }