From f4c20290509d7ed3a8fd5304577e7a4cc0b9d974 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 3 Apr 2007 03:49:53 +0000 Subject: Ok, no code is left in src, it's all in src/old. We'll gradually move code back into src as it's fixed and re-org'd. This includes tests, which, I may write a unit test system into libbu++ just to make my life easier. --- src/old/httpget.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/old/httpget.h (limited to 'src/old/httpget.h') diff --git a/src/old/httpget.h b/src/old/httpget.h new file mode 100644 index 0000000..8272641 --- /dev/null +++ b/src/old/httpget.h @@ -0,0 +1,44 @@ +#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 -- cgit v1.2.3