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
|
||||
|
@ -28,6 +28,9 @@
|
|||
#define XMRIG_HTTPDATA_H
|
||||
|
||||
|
||||
#include "base/tools/Object.h"
|
||||
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
@ -38,12 +41,28 @@ namespace xmrig {
|
|||
class HttpData
|
||||
{
|
||||
public:
|
||||
XMRIG_DISABLE_COPY_MOVE_DEFAULT(HttpData)
|
||||
|
||||
static const std::string kApplicationJson;
|
||||
static const std::string kContentType;
|
||||
static const std::string kContentTypeL;
|
||||
|
||||
|
||||
inline HttpData(uint64_t id) : m_id(id) {}
|
||||
virtual ~HttpData() = default;
|
||||
|
||||
inline uint64_t id() const { return m_id; }
|
||||
|
||||
int method = 0;
|
||||
int status = 0;
|
||||
virtual bool isRequest() const = 0;
|
||||
virtual const char *host() const = 0;
|
||||
virtual const char *tlsFingerprint() const = 0;
|
||||
virtual const char *tlsVersion() const = 0;
|
||||
virtual std::string ip() const = 0;
|
||||
virtual uint16_t port() const = 0;
|
||||
|
||||
int method = 0;
|
||||
int status = 0;
|
||||
int userType = 0;
|
||||
std::map<const std::string, const std::string> headers;
|
||||
std::string body;
|
||||
std::string url;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue