HTTP subsystem refactoring.
This commit is contained in:
parent
5486300db7
commit
cad5fef1ea
25 changed files with 474 additions and 216 deletions
|
@ -6,8 +6,8 @@
|
|||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2014-2019 heapwolf <https://github.com/heapwolf>
|
||||
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -24,8 +24,9 @@
|
|||
*/
|
||||
|
||||
|
||||
#include "3rdparty/http-parser/http_parser.h"
|
||||
#include "base/net/http/HttpApiResponse.h"
|
||||
#include "3rdparty/http-parser/http_parser.h"
|
||||
#include "base/net/http/HttpData.h"
|
||||
#include "rapidjson/prettywriter.h"
|
||||
#include "rapidjson/stringbuffer.h"
|
||||
|
||||
|
@ -75,7 +76,7 @@ void xmrig::HttpApiResponse::end()
|
|||
return HttpResponse::end();
|
||||
}
|
||||
|
||||
setHeader("Content-Type", "application/json");
|
||||
setHeader(HttpData::kContentType, HttpData::kApplicationJson);
|
||||
|
||||
StringBuffer buffer(nullptr, 4096);
|
||||
PrettyWriter<StringBuffer> writer(buffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue