forked from rosebudai/OpenRCT2-Web
Rename members of Http::Status
This commit is contained in:
8 files changed
+14
-14
No files matched your search
@@ -175,7 +175,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
req.method = Http::Method::GET;
|
||||
req.url = url;
|
||||
Http::DoAsync(req, [this, entry, name](Http::Response response) {
|
||||
if (response.status == Http::Status::Ok)
|
||||
if (response.status == Http::Status::ok)
|
||||
{
|
||||
// Check that download operation hasn't been cancelled
|
||||
if (_downloadingObjects)
|
||||
@@ -225,7 +225,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
req.method = Http::Method::GET;
|
||||
req.url = kOpenRCT2ApiLegacyObjectURL + name;
|
||||
Http::DoAsync(req, [this, entry, name](Http::Response response) {
|
||||
if (response.status == Http::Status::Ok)
|
||||
if (response.status == Http::Status::ok)
|
||||
{
|
||||
auto jresponse = Json::FromString(response.body);
|
||||
if (jresponse.is_object())
|
||||
@@ -241,7 +241,7 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (response.status == Http::Status::NotFound)
|
||||
else if (response.status == Http::Status::notFound)
|
||||
{
|
||||
Console::Error::WriteLine(" %s not found", name.c_str());
|
||||
QueueNextDownload();
|
||||
|
||||
@@ -1495,7 +1495,7 @@ namespace OpenRCT2
|
||||
try
|
||||
{
|
||||
res = Do(request);
|
||||
if (res.status != Http::Status::Ok)
|
||||
if (res.status != Http::Status::ok)
|
||||
throw std::runtime_error("bad http status");
|
||||
}
|
||||
catch (std::exception& e)
|
||||
|
||||
@@ -92,7 +92,7 @@ NewVersionInfo GetLatestVersion()
|
||||
try
|
||||
{
|
||||
res = Do(request);
|
||||
if (res.status != Http::Status::Ok)
|
||||
if (res.status != Http::Status::ok)
|
||||
throw std::runtime_error("bad http status");
|
||||
}
|
||||
catch (std::exception& e)
|
||||
|
||||
@@ -238,7 +238,7 @@ namespace OpenRCT2::Http
|
||||
WinHttpCloseHandle(hRequest);
|
||||
|
||||
Response response;
|
||||
response.status = Status::Error;
|
||||
response.status = Status::error;
|
||||
response.error = e.what();
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace OpenRCT2::Http
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
Response response;
|
||||
response.status = Status::Error;
|
||||
response.status = Status::error;
|
||||
response.error = e.what();
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ namespace OpenRCT2::Http
|
||||
{
|
||||
enum class Status
|
||||
{
|
||||
Invalid = 0,
|
||||
Error = 1,
|
||||
Ok = 200,
|
||||
NotFound = 404
|
||||
invalid = 0,
|
||||
error = 1,
|
||||
ok = 200,
|
||||
notFound = 404
|
||||
};
|
||||
|
||||
enum class Method
|
||||
|
||||
@@ -201,7 +201,7 @@ namespace OpenRCT2::Network
|
||||
request.header["Content-Type"] = "application/json";
|
||||
|
||||
_currentRequest = Http::DoAsync(request, [&](Http::Response response) -> void {
|
||||
if (response.status != Http::Status::Ok)
|
||||
if (response.status != Http::Status::ok)
|
||||
{
|
||||
Console::Error::WriteLine(
|
||||
"Unable to connect to master server, retrying in %d seconds",
|
||||
@@ -230,7 +230,7 @@ namespace OpenRCT2::Network
|
||||
_lastHeartbeatTime = Platform::GetTicks();
|
||||
|
||||
_currentRequest = Http::DoAsync(request, [&](Http::Response response) -> void {
|
||||
if (response.status != Http::Status::Ok)
|
||||
if (response.status != Http::Status::ok)
|
||||
{
|
||||
Console::Error::WriteLine(
|
||||
"Unable to connect to master server, retrying in %d seconds",
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace OpenRCT2::Network
|
||||
json_t root;
|
||||
try
|
||||
{
|
||||
if (response.status != Http::Status::Ok)
|
||||
if (response.status != Http::Status::ok)
|
||||
{
|
||||
throw MasterServerException(STR_SERVER_LIST_NO_CONNECTION);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user