#include "apiHandler.h" using namespace std; apiHandler::apiHandler(struct mg_connection *conn) { MyConnection = conn; } apiHandler::~apiHandler(void) { } int apiHandler::processRequest(void) { regex pattern {"^/api"}; if (regex_match(MyConnection->uri, pattern)) { mg_printf_data(MyConnection, "{json: true}"); return MG_TRUE; } else return MG_FALSE; }