#ifndef __REQUEST_H__ #define __REQUEST_H__ #include #include #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(); bool isValid(); 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& headers = std::unordered_map()); private: void* mCurl; void* mHeaders; std::string mCert; std::string mKey; bool mVerbose; bool mValid; }; } #endif // __REQUEST_H__