Multiple merge fixes, rebase, working Https::GET

This commit is contained in:
Lion Kortlepel
2021-08-17 14:33:03 +02:00
parent 5742ab0dad
commit 6462636b29
7 changed files with 50 additions and 128 deletions

View File

@@ -241,9 +241,9 @@ void TNetwork::Authentication(const TConnection& ClientConnection) {
auto RequestString = R"({"key":")" + Rc + "\"}";
auto Target = "/pkToUser";
int ResponseCode = -1;
unsigned int ResponseCode = 0;
if (!Rc.empty()) {
Rc = Http::POST(Application::GetBackendUrlForAuth(), Target, {}, RequestString, true, &ResponseCode);
Rc = Http::POST(Application::GetBackendUrlForAuth(), 443, Target, {}, RequestString, "application/json", &ResponseCode);
}
json::Document AuthResponse;
@@ -272,7 +272,6 @@ void TNetwork::Authentication(const TConnection& ClientConnection) {
Sentry.Log(SentryLevel::Error, "default", "unexpected backend response (" + std::to_string(ResponseCode) + ")");
}
return;
}
if (AuthResponse["username"].IsString() && AuthResponse["roles"].IsString()
@@ -931,4 +930,4 @@ std::string TNetwork::UDPRcvFromClient(sockaddr_in& client) const {
return "";
}
return std::string(Ret.begin(), Ret.begin() + Rcv);
}
}