olp-cpp-sdk  1.21.0
Public Types | Public Member Functions | List of all members
olp::http::NetworkProxySettings Class Referencefinal

Contains a proxy configuration for the network interface that is applied per request. More...

#include <NetworkProxySettings.h>

Public Types

enum class  Type {
  NONE , HTTP , HTTPS , SOCKS4 ,
  SOCKS4A , SOCKS5 , SOCKS5_HOSTNAME
}
 The proxy type. More...
 

Public Member Functions

Type GetType () const
 Gets the proxy type. More...
 
NetworkProxySettingsWithType (Type type)
 Sets the proxy type. More...
 
const std::string & GetHostname () const
 Gets the proxy hostname. More...
 
NetworkProxySettingsWithHostname (std::string hostname)
 Sets the proxy hostname. More...
 
std::uint16_t GetPort () const
 Gets the proxy port. More...
 
NetworkProxySettingsWithPort (std::uint16_t port)
 Sets the proxy port. More...
 
const std::string & GetUsername () const
 Gets the username. More...
 
NetworkProxySettingsWithUsername (std::string username)
 Sets the username. More...
 
const std::string & GetPassword () const
 Gets the password. More...
 
NetworkProxySettingsWithPassword (std::string password)
 Sets the password. More...
 

Detailed Description

Contains a proxy configuration for the network interface that is applied per request.

Member Enumeration Documentation

◆ Type

The proxy type.

Enumerator
NONE 

Don't use the proxy.

HTTP 

HTTP proxy as in https://www.ietf.org/rfc/rfc2068.txt.

HTTPS 

HTTPS proxy as in https://www.ietf.org/rfc/rfc2818.txt.

SOCKS4 

SOCKS4 proxy.

SOCKS4A 

SOCKS4a proxy. Proxy resolves the URL hostname.

SOCKS5 

SOCKS5 proxy.

SOCKS5_HOSTNAME 

SOCKS5 Proxy. Proxy resolves the URL hostname.

Member Function Documentation

◆ GetHostname()

const std::string& olp::http::NetworkProxySettings::GetHostname ( ) const

Gets the proxy hostname.

Returns
The proxy hostname.

◆ GetPassword()

const std::string& olp::http::NetworkProxySettings::GetPassword ( ) const

Gets the password.

Returns
The password.

◆ GetPort()

std::uint16_t olp::http::NetworkProxySettings::GetPort ( ) const

Gets the proxy port.

Returns
The proxy port.

◆ GetType()

Type olp::http::NetworkProxySettings::GetType ( ) const

Gets the proxy type.

Returns
The proxy type.

◆ GetUsername()

const std::string& olp::http::NetworkProxySettings::GetUsername ( ) const

Gets the username.

Returns
The username.

◆ WithHostname()

NetworkProxySettings& olp::http::NetworkProxySettings::WithHostname ( std::string  hostname)

Sets the proxy hostname.

Parameters
[in]hostnameThe proxy hostname.
Returns
A reference to *this.

◆ WithPassword()

NetworkProxySettings& olp::http::NetworkProxySettings::WithPassword ( std::string  password)

Sets the password.

Parameters
[in]passwordThe password.
Returns
A reference to *this.

◆ WithPort()

NetworkProxySettings& olp::http::NetworkProxySettings::WithPort ( std::uint16_t  port)

Sets the proxy port.

Parameters
[in]portThe proxy port.
Returns
A reference to *this.

◆ WithType()

NetworkProxySettings& olp::http::NetworkProxySettings::WithType ( Type  type)

Sets the proxy type.

Parameters
[in]typeThe proxy type.
Returns
A reference to *this.

◆ WithUsername()

NetworkProxySettings& olp::http::NetworkProxySettings::WithUsername ( std::string  username)

Sets the username.

Parameters
[in]usernameThe username.
Returns
A reference to *this.

The documentation for this class was generated from the following file: