OLD | NEW |
1 #ifndef ADBLOCKPLUS_WEB_REQUEST_H | 1 #ifndef ADBLOCKPLUS_WEB_REQUEST_H |
2 #define ADBLOCKPLUS_WEB_REQUEST_H | 2 #define ADBLOCKPLUS_WEB_REQUEST_H |
3 | 3 |
4 #include <string> | 4 #include <string> |
5 #include <vector> | 5 #include <vector> |
6 | 6 |
7 namespace AdblockPlus | 7 namespace AdblockPlus |
8 { | 8 { |
9 typedef std::vector<std::pair<std::string, std::string> > HeaderList; | 9 typedef std::vector<std::pair<std::string, std::string> > HeaderList; |
10 | 10 |
11 struct ServerResponse | 11 struct ServerResponse |
12 { | 12 { |
13 unsigned int status; | 13 int64_t status; |
14 HeaderList responseHeaders; | 14 HeaderList responseHeaders; |
15 int responseStatus; | 15 int responseStatus; |
16 std::string responseText; | 16 std::string responseText; |
17 }; | 17 }; |
18 | 18 |
19 class WebRequest | 19 class WebRequest |
20 { | 20 { |
21 public: | 21 public: |
22 enum | 22 enum |
23 { | 23 { |
(...skipping 17 matching lines...) Expand all Loading... |
41 virtual ServerResponse GET(const std::string& url, const HeaderList& request
Headers) const = 0; | 41 virtual ServerResponse GET(const std::string& url, const HeaderList& request
Headers) const = 0; |
42 }; | 42 }; |
43 | 43 |
44 class DefaultWebRequest : public WebRequest | 44 class DefaultWebRequest : public WebRequest |
45 { | 45 { |
46 ServerResponse GET(const std::string& url, const HeaderList& requestHeaders)
const; | 46 ServerResponse GET(const std::string& url, const HeaderList& requestHeaders)
const; |
47 }; | 47 }; |
48 } | 48 } |
49 | 49 |
50 #endif | 50 #endif |
OLD | NEW |