From 822b0b1cb3868fdfc2b7159cdbf11c3df776c9dd Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Sun, 12 Sep 2021 11:51:29 +0200 Subject: HttpResponse enum -> HttpResponseCode Also removed initial CbPackage API HttpServer changes as I have decided to take a different approach --- zenserver/testing/httptest.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'zenserver/testing/httptest.cpp') diff --git a/zenserver/testing/httptest.cpp b/zenserver/testing/httptest.cpp index 0639c2b53..653f76046 100644 --- a/zenserver/testing/httptest.cpp +++ b/zenserver/testing/httptest.cpp @@ -8,18 +8,16 @@ HttpTestingService::HttpTestingService() { m_Router.RegisterRoute( "hello", - [this](HttpRouterRequest& Req) { Req.ServerRequest().WriteResponse(HttpResponse::OK); }, + [this](HttpRouterRequest& Req) { Req.ServerRequest().WriteResponse(HttpResponseCode::OK); }, HttpVerb::kGet); m_Router.RegisterRoute( "echo", [this](HttpRouterRequest& Req) { IoBuffer Body = Req.ServerRequest().ReadPayload(); - Req.ServerRequest().WriteResponse(HttpResponse::OK, HttpContentType::kBinary, Body); + Req.ServerRequest().WriteResponse(HttpResponseCode::OK, HttpContentType::kBinary, Body); }, HttpVerb::kPost); - - m_Router.RegisterRoute("package", m_PackageHandler); } HttpTestingService::~HttpTestingService() @@ -38,11 +36,4 @@ HttpTestingService::HandleRequest(HttpServerRequest& Request) m_Router.HandleRequest(Request); } -void -HttpTestingService::PackageHandler::HandleRequest(HttpRouterRequest& Req) -{ - IoBuffer Body = Req.ServerRequest().ReadPayload(); - Req.ServerRequest().WriteResponse(HttpResponse::OK, HttpContentType::kBinary, Body); -} - } // namespace zen -- cgit v1.2.3