#pragma once #include #include #include #include using namespace std; #define IE_AGENT _T("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)") class __declspec(dllexport) CMyHttpClient { public: enum { SUCCESS = 0, FAILURE = 1, OUTTIME = 2 }; public: CMyHttpClient(LPCTSTR strAgent = IE_AGENT); virtual ~CMyHttpClient(void); //int HttpPostFile(LPCTSTR strUrl, std::vector& inputs, string &strResponse); int HttpDownload(LPCTSTR url, LPCTSTR post_data, std::vector &data); static boost::shared_ptr GetInstance(); private: void Clear(); private: CInternetSession *m_pSession; CHttpConnection *m_pConnection; CHttpFile *m_pHttpFile; public: int SetSendHeader(CString send); private: CString MySendHeader; };