Update base.
This commit is contained in:
parent
b38046db46
commit
46e49cde0b
40 changed files with 162 additions and 244 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue