Open Rakeki opened 2 years ago
std::unique_ptr m_listener;
void Host() { m_listener = std::make_unique("http://192.168.1.237:8080"); m_listener->support(methods::GET, WebServer::Get_Client); m_listener->open().wait(); }
// for every http call, Get_Client gets called twice static void Get_Client(http_request request) { Instance i(10,20201); if(i.CreateDirectory()) { request.reply(status_codes::OK, "Created"); } else { request.reply(status_codes::OK, "Error"); } }
std::unique_ptr m_listener;
void Host() { m_listener = std::make_unique("http://192.168.1.237:8080");
m_listener->support(methods::GET, WebServer::Get_Client);
m_listener->open().wait();
}
// for every http call, Get_Client gets called twice static void Get_Client(http_request request) { Instance i(10,20201); if(i.CreateDirectory()) { request.reply(status_codes::OK, "Created"); } else { request.reply(status_codes::OK, "Error"); } }