diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-04-03 03:49:53 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-04-03 03:49:53 +0000 |
commit | f4c20290509d7ed3a8fd5304577e7a4cc0b9d974 (patch) | |
tree | 13cdf64f7cf134f397a7165b7a3fe0807e37026b /src/old/httpget.h | |
parent | 74d4c8cd27334fc7204d5a8773deb3d424565778 (diff) | |
download | libbu++-f4c20290509d7ed3a8fd5304577e7a4cc0b9d974.tar.gz libbu++-f4c20290509d7ed3a8fd5304577e7a4cc0b9d974.tar.bz2 libbu++-f4c20290509d7ed3a8fd5304577e7a4cc0b9d974.tar.xz libbu++-f4c20290509d7ed3a8fd5304577e7a4cc0b9d974.zip |
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.
Diffstat (limited to 'src/old/httpget.h')
-rw-r--r-- | src/old/httpget.h | 44 |
1 files changed, 44 insertions, 0 deletions
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 @@ | |||
1 | #ifndef HTTP_GET_H | ||
2 | #define HTTP_GET_H | ||
3 | |||
4 | #include <stdint.h> | ||
5 | #include <string> | ||
6 | #include <list> | ||
7 | #include <utility> | ||
8 | |||
9 | #include "sbuffer.h" | ||
10 | |||
11 | class HttpGet | ||
12 | { | ||
13 | public: | ||
14 | HttpGet(); | ||
15 | HttpGet( const std::string &url ); | ||
16 | virtual ~HttpGet(); | ||
17 | |||
18 | void setURL( const std::string &url ); | ||
19 | void addParam( const std::string &key, const std::string &value ); | ||
20 | void setUserAgent( const std::string &sUserAgent ) | ||
21 | { | ||
22 | this->sUserAgent = sUserAgent; | ||
23 | } | ||
24 | void setHost( const std::string &sHost ) | ||
25 | { | ||
26 | this->sHost = sHost; | ||
27 | } | ||
28 | |||
29 | std::string escape( const std::string &src ); | ||
30 | SBuffer *get(); | ||
31 | |||
32 | private: | ||
33 | std::string sProto; | ||
34 | std::string sHost; | ||
35 | std::string sPath; | ||
36 | int nPort; | ||
37 | std::string sUserAgent; | ||
38 | typedef std::pair<std::string,std::string> StringPair; | ||
39 | std::list<StringPair> lParams; | ||
40 | static char hexcode[]; | ||
41 | |||
42 | }; | ||
43 | |||
44 | #endif | ||