diff options
| -rw-r--r-- | zenserver/diag/diagsvcs.cpp | 2 | ||||
| -rw-r--r-- | zenserver/testing/httptest.cpp | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/zenserver/diag/diagsvcs.cpp b/zenserver/diag/diagsvcs.cpp index eed23dff2..ef2baa1b4 100644 --- a/zenserver/diag/diagsvcs.cpp +++ b/zenserver/diag/diagsvcs.cpp @@ -44,7 +44,7 @@ HttpHealthService::HttpHealthService() { m_Router.RegisterRoute( "", - [this](HttpRouterRequest& RoutedReq) { + [](HttpRouterRequest& RoutedReq) { HttpServerRequest& HttpReq = RoutedReq.ServerRequest(); HttpReq.WriteResponse(HttpResponseCode::OK, HttpContentType::kText, u8"OK!"sv); }, diff --git a/zenserver/testing/httptest.cpp b/zenserver/testing/httptest.cpp index eedf06661..230d5d6c5 100644 --- a/zenserver/testing/httptest.cpp +++ b/zenserver/testing/httptest.cpp @@ -12,13 +12,13 @@ HttpTestingService::HttpTestingService() { m_Router.RegisterRoute( "hello", - [this](HttpRouterRequest& Req) { Req.ServerRequest().WriteResponse(HttpResponseCode::OK); }, + [](HttpRouterRequest& Req) { Req.ServerRequest().WriteResponse(HttpResponseCode::OK); }, HttpVerb::kGet); m_Router.RegisterRoute( "hello_slow", - [this](HttpRouterRequest& Req) { - Req.ServerRequest().WriteResponseAsync([this](HttpServerRequest& Request) { + [](HttpRouterRequest& Req) { + Req.ServerRequest().WriteResponseAsync([](HttpServerRequest& Request) { Stopwatch Timer; Sleep(1000); Request.WriteResponse(HttpResponseCode::OK, @@ -30,8 +30,8 @@ HttpTestingService::HttpTestingService() m_Router.RegisterRoute( "hello_veryslow", - [this](HttpRouterRequest& Req) { - Req.ServerRequest().WriteResponseAsync([this](HttpServerRequest& Request) { + [](HttpRouterRequest& Req) { + Req.ServerRequest().WriteResponseAsync([](HttpServerRequest& Request) { Stopwatch Timer; Sleep(60000); Request.WriteResponse(HttpResponseCode::OK, @@ -43,14 +43,14 @@ HttpTestingService::HttpTestingService() m_Router.RegisterRoute( "hello_throw", - [this](HttpRouterRequest& Req) { - Req.ServerRequest().WriteResponseAsync([this](HttpServerRequest&) { throw std::runtime_error("intentional error"); }); + [](HttpRouterRequest& Req) { + Req.ServerRequest().WriteResponseAsync([](HttpServerRequest&) { throw std::runtime_error("intentional error"); }); }, HttpVerb::kGet); m_Router.RegisterRoute( "hello_noresponse", - [this](HttpRouterRequest& Req) { Req.ServerRequest().WriteResponseAsync([this](HttpServerRequest&) {}); }, + [](HttpRouterRequest& Req) { Req.ServerRequest().WriteResponseAsync([](HttpServerRequest&) {}); }, HttpVerb::kGet); m_Router.RegisterRoute( @@ -82,7 +82,7 @@ HttpTestingService::HttpTestingService() m_Router.RegisterRoute( "echo", - [this](HttpRouterRequest& Req) { + [](HttpRouterRequest& Req) { IoBuffer Body = Req.ServerRequest().ReadPayload(); Req.ServerRequest().WriteResponse(HttpResponseCode::OK, HttpContentType::kBinary, Body); }, @@ -90,7 +90,7 @@ HttpTestingService::HttpTestingService() m_Router.RegisterRoute( "package", - [this](HttpRouterRequest& Req) { + [](HttpRouterRequest& Req) { CbPackage Pkg = Req.ServerRequest().ReadPayloadPackage(); Req.ServerRequest().WriteResponse(HttpResponseCode::OK, Pkg); }, |