Added constructor to use if auth options are encoded into the url.
authorBjoern Sikora <bjoern.sikora@intra2net.com>
Thu, 3 Sep 2009 10:58:57 +0000 (12:58 +0200)
committerBjoern Sikora <bjoern.sikora@intra2net.com>
Thu, 3 Sep 2009 10:58:57 +0000 (12:58 +0200)
src/httphelper.cpp
src/httphelper.h

index 5794362..984e9e6 100644 (file)
@@ -21,7 +21,7 @@ HTTPHelper::HTTPHelper()
 
 
 /**
- * Constructor
+ * Constructor. Use this constructor if HTTP AUTH should be used. Username and password will then be set as HTTP auth options.
  * @param _log Logger Object 
  * @param _proxy Proxy to use
  * @param _proxy_port Proxy Port
@@ -40,6 +40,21 @@ HTTPHelper::HTTPHelper(Logger::Ptr _log, const string& _proxy, const int _proxy_
 
 
 /**
+ * Constructor. Use this constructor if you have to encode the username and password into the url
+ * @param _log Logger Object 
+ * @param _proxy Proxy to use
+ * @param _proxy_port Proxy Port
+ */
+HTTPHelper::HTTPHelper(Logger::Ptr _log, const string& _proxy, const int _proxy_port)
+{
+    Log = _log;
+    Proxy = _proxy;
+    ProxyPort = _proxy_port;
+    CurlEasyHandle = init_curl(CurlWritedataBuff, CurlErrBuff);
+}
+
+
+/**
  * Destructor
  */
 HTTPHelper::~HTTPHelper()
index 97df6b8..bb1b7c3 100644 (file)
@@ -40,6 +40,8 @@ public:
 
     HTTPHelper(Logger::Ptr _log, const std::string& _proxy, const int _proxy_port, const std::string& _username, const std::string& _password);
 
+    HTTPHelper(Logger::Ptr _log, const std::string& _proxy, const int _proxy_port);
+
     ~HTTPHelper();
 
     CURL* init_curl(std::string& curl_writedata_buff, char* curl_err_buff) const;