diff --git a/src/openrct2/core/Http.h b/src/openrct2/core/Http.h index 873d9b7e5e..e593518d3d 100644 --- a/src/openrct2/core/Http.h +++ b/src/openrct2/core/Http.h @@ -22,6 +22,7 @@ namespace Http { enum class Status { + Invalid = 0, Ok = 200, NotFound = 404 }; @@ -35,20 +36,20 @@ namespace Http struct Response { - Status status; + Status status{}; std::string content_type; - std::string body = ""; + std::string body; std::map header = {}; - std::string error = ""; + std::string error; }; struct Request { std::string url; - std::map header = {}; + std::map header; Method method = Method::GET; - std::string body = ""; - bool forceIPv4 = false; + std::string body; + bool forceIPv4{}; }; Response Do(const Request& req); @@ -56,7 +57,7 @@ namespace Http inline void DoAsync(const Request& req, std::function fn) { auto thread = std::thread([=]() { - Response res; + Response res{}; try { res = Do(req);