C++ Rest SDK
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Public Types | Public Member Functions | List of all members
web::web_proxy Class Reference

web_proxy represents the concept of the web proxy, which can be auto-discovered, disabled, or specified explicitly by the user. More...

#include <web_utilities.h>

Public Types

enum  web_proxy_mode { use_default = use_default_, use_auto_discovery = use_auto_discovery_, disabled = disabled_ }
 

Public Member Functions

 web_proxy ()
 Constructs a proxy with the default settings. More...
 
 web_proxy (web_proxy_mode mode)
 Creates a proxy with specified mode. More...
 
 web_proxy (uri address)
 Creates a proxy explicitly with provided address. More...
 
const uriaddress () const
 Gets this proxy's URI address. Returns an empty URI if not explicitly set by user. More...
 
const web::credentialscredentials () const
 Gets the credentials used for authentication with this proxy. More...
 
void set_credentials (web::credentials cred)
 Sets the credentials to use for authentication with this proxy. More...
 
bool is_default () const
 Checks if this proxy was constructed with default settings. More...
 
bool is_disabled () const
 Checks if using a proxy is disabled. More...
 
bool is_auto_discovery () const
 Checks if the auto discovery protocol, WPAD, is to be used. More...
 
bool is_specified () const
 Checks if a proxy address is explicitly specified by the user. More...
 

Detailed Description

web_proxy represents the concept of the web proxy, which can be auto-discovered, disabled, or specified explicitly by the user.

Constructor & Destructor Documentation

web::web_proxy::web_proxy ( )
inline

Constructs a proxy with the default settings.

web::web_proxy::web_proxy ( web_proxy_mode  mode)
inline

Creates a proxy with specified mode.

Parameters
modeMode to use.
web::web_proxy::web_proxy ( uri  address)
inline

Creates a proxy explicitly with provided address.

Parameters
addressProxy URI to use.

Member Function Documentation

const uri& web::web_proxy::address ( ) const
inline

Gets this proxy's URI address. Returns an empty URI if not explicitly set by user.

Returns
A reference to this proxy's URI.
const web::credentials& web::web_proxy::credentials ( ) const
inline

Gets the credentials used for authentication with this proxy.

Returns
Credentials to for this proxy.
bool web::web_proxy::is_auto_discovery ( ) const
inline

Checks if the auto discovery protocol, WPAD, is to be used.

Returns
True if auto discovery enabled, false otherwise.
bool web::web_proxy::is_default ( ) const
inline

Checks if this proxy was constructed with default settings.

Returns
True if default, false otherwise.
bool web::web_proxy::is_disabled ( ) const
inline

Checks if using a proxy is disabled.

Returns
True if disabled, false otherwise.
bool web::web_proxy::is_specified ( ) const
inline

Checks if a proxy address is explicitly specified by the user.

Returns
True if a proxy address was explicitly specified, false otherwise.
void web::web_proxy::set_credentials ( web::credentials  cred)
inline

Sets the credentials to use for authentication with this proxy.

Parameters
credCredentials to use for this proxy.

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