Update src/Http.cpp

Co-authored-by: Lion <development@kortlepel.com>
This commit is contained in:
SaltySnail
2024-06-16 02:52:55 +02:00
committed by GitHub
parent c07baeed1a
commit 63fa65e9a7

View File

@@ -60,8 +60,7 @@ static thread_local std::array<std::shared_ptr<httplib::SSLClient>, CONNECTION_A
}
std::string Http::GET(const std::string& host, int port, const std::string& target, unsigned int* status) {
std::shared_ptr<httplib::SSLClient> client;
client = getClient({host, port});
std::shared_ptr<httplib::SSLClient> client = getClient({host, port});
client->enable_server_certificate_verification(false);
client->set_address_family(AF_INET);
auto res = client->Get(target.c_str());