HTTP client configuration class, used to set the possible configuration options used to create an http_client instance.
More...
#include <http_client.h>
HTTP client configuration class, used to set the possible configuration options used to create an http_client instance.
size_t web::http::client::http_client_config::chunksize |
( |
| ) |
const |
|
inline |
Get the client chunk size.
- Returns
- The internal buffer size used by the http client when sending and receiving data from the network.
Get the client credentials
- Returns
- A reference to the client credentials.
const std::function<void(boost::asio::ssl::context&)>& web::http::client::http_client_config::get_ssl_context_callback |
( |
| ) |
const |
|
inline |
Gets the user's callback to allow for customization of the ssl context.
bool web::http::client::http_client_config::guarantee_order |
( |
| ) |
const |
|
inline |
Get the 'guarantee order' property
- Returns
- The value of the property.
void web::http::client::http_client_config::invoke_nativehandle_options |
( |
native_handle |
handle | ) |
const |
|
inline |
Invokes a user's callback to allow for customization of the request.
- Parameters
-
handle | A internal implementation handle. |
bool web::http::client::http_client_config::is_default_chunksize |
( |
| ) |
const |
|
inline |
Returns true if the default chunk size is in use.
If true, implementations are allowed to choose whatever size is best.
- Returns
- True if default, false if set by user.
Get OAuth 1.0 configuration.
- Returns
- Shared pointer to OAuth 1.0 configuration.
Get OAuth 2.0 configuration.
- Returns
- Shared pointer to OAuth 2.0 configuration.
const web_proxy& web::http::client::http_client_config::proxy |
( |
| ) |
const |
|
inline |
Get the web proxy object
- Returns
- A reference to the web proxy object.
void web::http::client::http_client_config::set_chunksize |
( |
size_t |
size | ) |
|
|
inline |
Sets the client chunk size.
- Parameters
-
size | The internal buffer size used by the http client when sending and receiving data from the network. |
This is a hint – an implementation may disregard the setting and use some other chunk size.
Set the client credentials
- Parameters
-
cred | A reference to the client credentials. |
void web::http::client::http_client_config::set_guarantee_order |
( |
bool |
guarantee_order | ) |
|
|
inline |
Set the 'guarantee order' property
- Parameters
-
guarantee_order | The value of the property. |
void web::http::client::http_client_config::set_nativehandle_options |
( |
const std::function< void(native_handle)> & |
callback | ) |
|
|
inline |
Sets a callback to enable custom setting of platform specific options.
The native_handle is the following type depending on the underlying platform: Windows Desktop, WinHTTP - HINTERNET Windows Runtime, WinRT - IXMLHTTPRequest2 * All other platforms, Boost.Asio: https - boost::asio::ssl::stream<boost::asio::ip::tcp::socket &> * http - boost::asio::ip::tcp::socket *
- Parameters
-
callback | A user callback allowing for customization of the request |
Set OAuth 1.0 configuration.
- Parameters
-
config | OAuth 1.0 configuration to set. |
Set OAuth 2.0 configuration.
- Parameters
-
config | OAuth 2.0 configuration to set. |
void web::http::client::http_client_config::set_proxy |
( |
web_proxy |
proxy | ) |
|
|
inline |
Set the web proxy object
- Parameters
-
proxy | A reference to the web proxy object. |
void web::http::client::http_client_config::set_ssl_context_callback |
( |
const std::function< void(boost::asio::ssl::context &)> & |
callback | ) |
|
|
inline |
Sets a callback to enable custom setting of the ssl context, at construction time.
- Parameters
-
callback | A user callback allowing for customization of the ssl context at construction time. |
template<class T >
void web::http::client::http_client_config::set_timeout |
( |
const T & |
timeout | ) |
|
|
inline |
Set the timeout
- Parameters
-
timeout | The timeout (duration from microseconds range and up) used for each send and receive operation on the client. |
void web::http::client::http_client_config::set_validate_certificates |
( |
bool |
validate_certs | ) |
|
|
inline |
Sets the server certificate validation property.
- Parameters
-
validate_certs | False to turn ignore all server certificate validation errors, true otherwise. |
Note ignoring certificate errors can be dangerous and should be done with caution.
utility::seconds web::http::client::http_client_config::timeout |
( |
| ) |
const |
|
inline |
Get the timeout
- Returns
- The timeout (in seconds) used for each send and receive operation on the client.
template<class T >
T web::http::client::http_client_config::timeout |
( |
| ) |
const |
|
inline |
Get the timeout
- Returns
- The timeout (in whatever duration) used for each send and receive operation on the client.
bool web::http::client::http_client_config::validate_certificates |
( |
| ) |
const |
|
inline |
Gets the server certificate validation property.
- Returns
- True if certificates are to be verified, false otherwise.
The documentation for this class was generated from the following file: