1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 10:22:52 +01:00

Pass HTTP method & path to dispatch()

This commit is contained in:
Timmy Sjöstedt 2015-04-25 01:10:01 +02:00
parent a697ec382e
commit db8e4ea1aa
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ void HttpServer::run()
std::string http_method = regex_match.str(1);
std::string http_path = regex_match.str(2);
std::string response = dispatch();
std::string response = dispatch(http_method, http_path);
client.send(response.c_str(), response.size());
}
@ -48,7 +48,7 @@ void HttpServer::run()
listener.close();
}
std::string HttpServer::dispatch()
std::string HttpServer::dispatch(std::string method, std::string path)
{
return "HTTP/1.1 200 OK\n\n<h1>HELLO FROM OPENRW</h1>";
}

View File

@ -30,5 +30,5 @@ private:
RWGame* game;
GameWorld* world;
std::string dispatch();
std::string dispatch(std::string method, std::string path);
};