Move "Content-Type" header setting.
This commit is contained in:
parent
616c52f266
commit
f0db17be87
@ -140,7 +140,6 @@ void xmrig::HttpClient::handshake()
|
|||||||
|
|
||||||
if (!body.empty()) {
|
if (!body.empty()) {
|
||||||
headers.insert({ "Content-Length", std::to_string(body.size()) });
|
headers.insert({ "Content-Length", std::to_string(body.size()) });
|
||||||
headers.insert({ "Content-Type", "application/json" });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
|||||||
@ -384,6 +384,10 @@ void xmrig::DaemonClient::send(int method, const char *url, const char *data, si
|
|||||||
|
|
||||||
client->setQuiet(isQuiet());
|
client->setQuiet(isQuiet());
|
||||||
client->connect(m_pool.host(), m_pool.port());
|
client->connect(m_pool.host(), m_pool.port());
|
||||||
|
|
||||||
|
if (method != HTTP_GET) {
|
||||||
|
client->headers.insert({ "Content-Type", "application/json" });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user