Update to dms control phase1.
This commit is contained in:
32
thirdParty/Req/pub/include/Request.h
vendored
Normal file
32
thirdParty/Req/pub/include/Request.h
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef __REQUEST_H__
|
||||
#define __REQUEST_H__
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "Response.h"
|
||||
namespace Req {
|
||||
class Request {
|
||||
public:
|
||||
static void Init();
|
||||
static void Dispose();
|
||||
Request();
|
||||
Request(Request &&) = delete;
|
||||
Request(const Request &) = delete;
|
||||
Request &operator=(Request &&) = delete;
|
||||
Request &operator=(const Request &) = delete;
|
||||
~Request();
|
||||
void setClientCertificate(const std::string &cerPath, const std::string &keyPath);
|
||||
void setVerbose(bool verbose);
|
||||
Response post(const std::string& url, const std::string &body = std::string(),
|
||||
const std::unordered_map<std::string, std::string>& headers =
|
||||
std::unordered_map<std::string, std::string>());
|
||||
|
||||
private:
|
||||
void* mCurl;
|
||||
void* mHeaders;
|
||||
std::string mCert;
|
||||
std::string mKey;
|
||||
bool mVerbose;
|
||||
};
|
||||
}
|
||||
#endif // __REQUEST_H__
|
||||
Reference in New Issue
Block a user