Cleanup of server-constructors. Previous constructors have been marked as deprecated.

This commit is contained in:
eidheim 2016-12-29 09:53:58 +01:00
commit 6c3a59d9ba
6 changed files with 58 additions and 30 deletions

View file

@ -9,7 +9,8 @@ typedef SimpleWeb::Server<SimpleWeb::HTTP> HttpServer;
typedef SimpleWeb::Client<SimpleWeb::HTTP> HttpClient;
int main() {
HttpServer server(8080, 1);
HttpServer server;
server.config.port=8080;
server.resource["^/string$"]["POST"]=[](shared_ptr<HttpServer::Response> response, shared_ptr<HttpServer::Request> request) {
auto content=request->content.string();