#pragma once // curl #define USE_OPENSSL #define CURL_STATICLIB #include #pragma comment(lib, "ws2_32.lib") #pragma comment(lib, "wldap32.lib") #pragma comment(lib, "libcurl.lib") #pragma comment(lib,"Crypt32.lib") #include #pragma comment(lib,"jsoncpp_static.lib") class CHttpClient { public: BOOL sendWarnMsg(const char* postParams); CURLcode curl_post_req(const char* url, const char* postParams, std::string &response); static CHttpClient* GetInStance() { return &sp; } private: CHttpClient() {}; CHttpClient(const CHttpClient&); CHttpClient& operator = (const CHttpClient&) = delete; ~CHttpClient() {}; static size_t req_reply(void * ptr, size_t size, size_t nmemb, void * stream); static CHttpClient sp; };