net-cpp: core::net::http::Request::Configuration Struct Reference

net-cpp .. C++11 library for networking purposes

Static Public Member Functions | Public Attributes | List of all members
core::net::http::Request::Configuration Struct Reference

The Configuration struct encapsulates all options for creating requests. More...

`#include <request.h>`

Collaboration diagram for core::net::http::Request::Configuration:

## Static Public Member Functions
static Configuration | from_uri_as_string (const std::string &uri)
| from_uri_as_string creates a new instance of Configuration for a url. More...

## Public Attributes
std::string | uri
Header | header
ProgressHandler | on_progress
ResponseHandler | on_response
ErrorHandler | on_error
struct {
bool verify_peer
bool verify_host
} | ssl
struct {
AuthenicationHandler for_http
AuthenicationHandler for_proxy
} | authentication_handler

## Detailed Description

The Configuration struct encapsulates all options for creating requests.

Definition at line 162 of file request.h.

## Member Function Documentation

## ◆ from_uri_as_string()

static Configuration core::net::http::Request::Configuration::from_uri_as_string | ( | const std::string & | uri | ) |
| inlinestatic

from_uri_as_string creates a new instance of Configuration for a url.

Parameters

  uri | The url of the web resource to issue a request for.

Returns
  A new Configuration instance.

Definition at line 169 of file request.h.

References uri.

## Member Data Documentation

## ◆ authentication_handler

struct { ... } core::net::http::Request::Configuration::authentication_handler

Encapsulates proxy and http authentication handlers.

## ◆ for_http

AuthenicationHandler core::net::http::Request::Configuration::for_http

Invoked for querying user credentials to do basic/digest auth.

Definition at line 212 of file request.h.

## ◆ for_proxy

AuthenicationHandler core::net::http::Request::Configuration::for_proxy

Invoked for querying user credentials to authenticate proxy accesses.

Definition at line 214 of file request.h.

## ◆ header

Header core::net::http::Request::Configuration::header

Custom header fields that are added to the request.

Definition at line 181 of file request.h.

## ◆ on_error

ErrorHandler core::net::http::Request::Configuration::on_error

Invoked to report a request that finished with an error.

Definition at line 190 of file request.h.

## ◆ on_progress

ProgressHandler core::net::http::Request::Configuration::on_progress

Invoked to report progress.

Definition at line 184 of file request.h.

## ◆ on_response

ResponseHandler core::net::http::Request::Configuration::on_response

Invoked to report a successfully finished request.

Definition at line 187 of file request.h.

## ◆ ssl

struct { ... } core::net::http::Request::Configuration::ssl

SSL-specific options. Please be very careful when adjusting these.

## ◆ uri

std::string core::net::http::Request::Configuration::uri

Uri of the web resource to issue a request for.

Definition at line 178 of file request.h.

Referenced by from_uri_as_string().

## ◆ verify_host

bool core::net::http::Request::Configuration::verify_host

Initial value:
{
true
}

Yes, we want to be strict and verify the host by default, too.

Definition at line 202 of file request.h.

## ◆ verify_peer

bool core::net::http::Request::Configuration::verify_peer

Initial value:
{
true
}

Yes, we want to verify our peer by default.

Definition at line 196 of file request.h.

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

- /home/odroid/lomiri/net-cpp-git/src/net-cpp/include/core/net/http/request.h