mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-25 13:42:54 -05:00
Update HTTP
This commit is contained in:
@@ -322,7 +322,7 @@ void xmrig::BenchClient::send(Request request)
|
||||
case GET_BENCH:
|
||||
{
|
||||
FetchRequest req(HTTP_GET, m_ip, BenchConfig::kApiPort, fmt::format("/1/benchmark/{}", m_job.id()).c_str(), BenchConfig::kApiTLS, true);
|
||||
fetch(std::move(req), m_httpListener);
|
||||
fetch(tag(), std::move(req), m_httpListener);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -336,7 +336,7 @@ void xmrig::BenchClient::send(Request request)
|
||||
doc.AddMember("cpu", Cpu::toJSON(doc), allocator);
|
||||
|
||||
FetchRequest req(HTTP_POST, m_ip, BenchConfig::kApiPort, "/1/benchmark", doc, BenchConfig::kApiTLS, true);
|
||||
fetch(std::move(req), m_httpListener);
|
||||
fetch(tag(), std::move(req), m_httpListener);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -375,6 +375,6 @@ void xmrig::BenchClient::update(const rapidjson::Value &body)
|
||||
FetchRequest req(HTTP_PATCH, m_ip, BenchConfig::kApiPort, fmt::format("/1/benchmark/{}", m_job.id()).c_str(), body, BenchConfig::kApiTLS, true);
|
||||
req.headers.insert({ "Authorization", fmt::format("Bearer {}", m_token)});
|
||||
|
||||
fetch(std::move(req), m_httpListener);
|
||||
fetch(tag(), std::move(req), m_httpListener);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user