mirror of
https://github.com/xmrig/xmrig.git
synced 2026-01-30 17:12:53 -05:00
Update base.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user