diff options
Diffstat (limited to 'src/modules/httpclient.h')
-rw-r--r-- | src/modules/httpclient.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/modules/httpclient.h b/src/modules/httpclient.h index c5e84261f..a89de4785 100644 --- a/src/modules/httpclient.h +++ b/src/modules/httpclient.h @@ -23,6 +23,7 @@ typedef std::map<std::string,std::string> HeaderMap; const char* HTTP_CLIENT_RESPONSE = "HTTPCLIENT_RESPONSE"; const char* HTTP_CLIENT_REQUEST = "HTTPCLIENT_REQUEST"; +const char* HTTP_CLIENT_ERROR = "HTTPCLIENT_ERROR"; /** This class represents an outgoing HTTP request */ @@ -67,6 +68,26 @@ class HTTPClientRequest : public Request } }; +class HTTPClientError : public Request +{ + protected: + friend class HTTPSocket; + std::string url; + int response; + std::string responsestr; + HeaderMap Headers; + public: + HTTPClientError(Module* src, Module* target, const std::string &url, int response) + : Request(src, target, HTTP_CLIENT_ERROR), url(url), response(response) + { + } + + const std::string &GetURL() + { + return url; + } +}; + class HTTPClientResponse : public Request { protected: |