#ifndef HTTP_GET_H #define HTTP_GET_H #include #include #include #include #include "sbuffer.h" class HttpGet { public: HttpGet(); HttpGet( const std::string &url ); virtual ~HttpGet(); void setURL( const std::string &url ); void addParam( const std::string &key, const std::string &value ); void setUserAgent( const std::string &sUserAgent ) { this->sUserAgent = sUserAgent; } void setHost( const std::string &sHost ) { this->sHost = sHost; } std::string escape( const std::string &src ); SBuffer *get(); private: std::string sProto; std::string sHost; std::string sPath; int nPort; std::string sUserAgent; typedef std::pair StringPair; std::list lParams; static char hexcode[]; }; #endif