Update base.

This commit is contained in:
XMRig 2020-04-29 14:17:33 +07:00
parent b38046db46
commit 46e49cde0b
No known key found for this signature in database
GPG key ID: 446A53638BE94409
40 changed files with 162 additions and 244 deletions

View file

@ -26,6 +26,19 @@ namespace xmrig {
const std::string HttpData::kApplicationJson = "application/json";
const std::string HttpData::kContentType = "Content-Type";
const std::string HttpData::kContentTypeL = "content-type";
const std::string HttpData::kTextPlain = "text/plain";
} // namespace xmrig
bool xmrig::HttpData::isJSON() const
{
if (!headers.count(kContentTypeL)) {
return false;
}
auto &type = headers.at(kContentTypeL);
return type == kApplicationJson || type == kTextPlain;
}