add MP.HttpsGET, MP.HttpsPOST

This commit is contained in:
Lion Kortlepel
2021-07-01 00:33:28 +02:00
parent 8853cef809
commit 44e0f3aa21
5 changed files with 188 additions and 42 deletions

View File

@@ -281,12 +281,12 @@ void TNetwork::Authentication(SOCKET TCPSock) {
}
if (!Rc.empty()) {
Rc = Http::POST(Application::GetBackendUrlForAuth(), "/pkToUser", {}, R"({"key":")" + Rc + "\"}", "application/json");
Rc = Http::POST(Application::GetBackendUrlForAuth(), 443, "/pkToUser", {}, R"({"key":")" + Rc + "\"}", "application/json");
}
json::Document AuthResponse;
AuthResponse.Parse(Rc.c_str());
if (Rc == "-1" || AuthResponse.HasParseError()) {
if (Rc == Http::ErrorString || AuthResponse.HasParseError()) {
ClientKick(*Client, "Invalid key! Please restart your game.");
return;
}