mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-30 13:47:10 +01:00
Net: near complete merge to 1.4.2
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// HTTPSessionFactory.h
|
||||
//
|
||||
// $Id: //poco/svn/Net/include/Poco/Net/HTTPSessionFactory.h#2 $
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPSessionFactory.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPClient
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "Poco/Mutex.h"
|
||||
#include "Poco/URI.h"
|
||||
#include "Poco/SingletonHolder.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include <map>
|
||||
|
||||
|
||||
@@ -105,6 +106,15 @@ public:
|
||||
|
||||
void setProxy(const std::string& proxyHost, Poco::UInt16 proxyPort);
|
||||
/// Sets the proxy host and port number.
|
||||
|
||||
void setProxyCredentials(const std::string& username, const std::string& password);
|
||||
/// Sets the username and password for proxy authorization (Basic auth only).
|
||||
|
||||
const std::string& proxyUsername() const;
|
||||
/// Returns the username for proxy authorization.
|
||||
|
||||
const std::string& proxyPassword() const;
|
||||
/// Returns the password for proxy authorization.
|
||||
|
||||
static HTTPSessionFactory& defaultFactory();
|
||||
/// Returns the default HTTPSessionFactory.
|
||||
@@ -127,6 +137,8 @@ private:
|
||||
Instantiators _instantiators;
|
||||
std::string _proxyHost;
|
||||
Poco::UInt16 _proxyPort;
|
||||
std::string _proxyUsername;
|
||||
std::string _proxyPassword;
|
||||
|
||||
mutable Poco::FastMutex _mutex;
|
||||
};
|
||||
@@ -147,6 +159,18 @@ inline Poco::UInt16 HTTPSessionFactory::proxyPort() const
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPSessionFactory::proxyUsername() const
|
||||
{
|
||||
return _proxyUsername;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPSessionFactory::proxyPassword() const
|
||||
{
|
||||
return _proxyPassword;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user