Replaced cURL with evpp

This commit is contained in:
Anonymous-275
2021-03-29 16:43:17 +03:00
parent 5c1b7b1dbf
commit fff747afca
9 changed files with 172 additions and 164 deletions

View File

@@ -6,7 +6,7 @@
/// Created by Anonymous275 on 11/26/2020
///
#include "Curl/http.h"
#include "http.h"
#include <filesystem>
#include "Logger.h"
#include <fstream>
@@ -47,7 +47,7 @@ std::string Login(const std::string& fields){
return "";
}
info("Attempting to authenticate...");
std::string Buffer = PostHTTP("https://auth.beammp.com/userlogin", fields);
std::string Buffer = HTTP::Post("https://auth.beammp.com/userlogin", fields);
json::Document d;
d.Parse(Buffer.c_str());
if(Buffer == "-1"){
@@ -88,7 +88,7 @@ void CheckLocalKey(){
Key.read(&Buffer[0], Size);
Key.close();
Buffer = PostHTTP("https://auth.beammp.com/userlogin", R"({"pk":")"+Buffer+"\"}");
Buffer = HTTP::Post("https://auth.beammp.com/userlogin", R"({"pk":")" + Buffer + "\"}");
json::Document d;
d.Parse(Buffer.c_str());