#ifndef __HTTPCLIENT_H__ #define __HTTPCLIENT_H__ #include #include #include #include #include #include #include typedef std::vector t_headers; extern t_headers no_headers; class HttpClient : public Task { public: HttpClient(const String & url, Handle * out, const String & fake_host = "", t_headers = no_headers); virtual ~HttpClient(); String GetStatus(); t_headers reply_headers; String reply; protected: virtual int Do() throw (GeneralException); private: void DecodeURL() throw (GeneralException); String url; Handle * out; String fake_host; t_headers headers; Socket Client; Buffer b, b2; String host, uri, status; int http_code; bool chunked; Task * c; }; #endif