core::net::http::StreamingClient Class Referenceabstract

`#include <streaming_client.h>`

Inheritance diagram for core::net::http::StreamingClient:
Collaboration diagram for core::net::http::StreamingClient:

## Public Member Functions

virtual | ~StreamingClient ()=default
virtual std::shared_ptr< StreamingRequest > | streaming_get (const Request::Configuration &configuration)=0
| streaming_get is a convenience method for issueing a GET request for the given URI.
virtual std::shared_ptr< StreamingRequest > | streaming_head (const Request::Configuration &configuration)=0
| streaming_head is a convenience method for issueing a HEAD request for the given URI.
virtual std::shared_ptr< StreamingRequest > | streaming_put (const Request::Configuration &configuration, std::istream &payload, std::size_t size)=0
| streaming_put is a convenience method for issuing a PUT request for the given URI.
virtual std::shared_ptr< StreamingRequest > | streaming_post (const Request::Configuration &configuration, const std::string &payload, const std::string &type)=0
| streaming_post is a convenience method for issuing a POST request for the given URI.
virtual std::shared_ptr< StreamingRequest > | streaming_post_form (const Request::Configuration &configuration, const std::map< std::string, std::string > &values)=0
| streaming_post_form is a convenience method for issuing a POST request for the given URI, with url-encoded payload.
virtual std::shared_ptr< StreamingRequest > | streaming_post (const Request::Configuration &configuration, std::istream &payload, std::size_t size)=0
| streaming_post is a convenience method for issuing a POST request for the given URI.
virtual std::shared_ptr< StreamingRequest > | streaming_post (const Request::Configuration &configuration, std::function< size_t(void *dest, std::size_t buf_size)> readdata_callback, std::size_t size)=0
| streaming_post is a convenience method for issuing a POST request for the given URI.
virtual std::shared_ptr< StreamingRequest > | streaming_put (const Request::Configuration &configuration, std::function< size_t(void *dest, std::size_t buf_size)> readdata_callback, std::size_t size)=0
| streaming_put is a convenience method for issuing a PUT request for the given URI.
virtual std::shared_ptr< StreamingRequest > | streaming_del (const Request::Configuration &configuration)=0
| streaming_del is a convenience method for issuing a DELETE request for the given URI.
Public Member Functions inherited from core::net::http::Client
| Client (const Client &)=delete
virtual | ~Client ()=default
Client & | operator= (const Client &)=delete
bool | operator== (const Client &) const =delete
virtual std::string | uri_to_string (const core::net::Uri &uri) const
virtual std::string | url_escape (const std::string &s) const =0
| Percent-encodes the given string.
virtual std::string | base64_encode (const std::string &s) const =0
| Base64-encodes the given string.
virtual std::string | base64_decode (const std::string &s) const =0
| Base64-decodes the given string.
virtual Timings | timings ()=0
| Queries timing statistics over all requests that have been executed by this client.
virtual void | run ()=0
| Execute the client and any impl-specific thread-pool or runtime.
virtual void | stop ()=0
| Stop the client and any impl-specific thread-pool or runtime.
virtual std::shared_ptr< Request > | get (const Request::Configuration &configuration)=0
| get is a convenience method for issueing a GET request for the given URI.
virtual std::shared_ptr< Request > | head (const Request::Configuration &configuration)=0
| head is a convenience method for issueing a HEAD request for the given URI.
virtual std::shared_ptr< Request > | put (const Request::Configuration &configuration, std::istream &payload, std::size_t size)=0
| put is a convenience method for issuing a PUT request for the given URI.
virtual std::shared_ptr< Request > | post (const Request::Configuration &configuration, const std::string &payload, const std::string &type)=0
| post is a convenience method for issuing a POST request for the given URI.
virtual std::shared_ptr< Request > | post_form (const Request::Configuration &configuration, const std::map< std::string, std::string > &values)
| post_form is a convenience method for issuing a POST request for the given URI, with url-encoded payload.
std::shared_ptr< Request > | post (const Request::Configuration &configuration, std::istream &payload, std::size_t size)
| post is a convenience method for issuing a POST request for the given URI.
std::shared_ptr< Request > | del (const Request::Configuration &configuration)
| del is a convenience method for issueing a DELETE request for the given URI.

## Additional Inherited Members

Protected Member Functions inherited from core::net::http::Client
| Client ()=default

## Detailed Description

Definition at line 32 of file streaming_client.h.

## Constructor & Destructor Documentation

## ~StreamingClient()

virtual core::net::http::StreamingClient::~StreamingClient | ( |  | ) |

virtual default

## Member Function Documentation

## streaming_del()

virtual std::shared_ptr< StreamingRequest > core::net::http::StreamingClient::streaming_del | ( | const Request::Configuration & | configuration | ) |

pure virtual

streaming_del is a convenience method for issuing a DELETE request for the given URI.

Exceptions

  Errors::HttpMethodNotSupported | if the underlying implementation does not support the provided HTTP method.

Parameters

  configuration | The configuration to issue a del request for.

Returns
  An executable instance of class Request.

## streaming_get()

virtual std::shared_ptr< StreamingRequest > core::net::http::StreamingClient::streaming_get | ( | const Request::Configuration & | configuration | ) |

pure virtual

streaming_get is a convenience method for issueing a GET request for the given URI.

Exceptions

  Errors::HttpMethodNotSupported | if the underlying implementation does not support the provided HTTP method.

Parameters

  configuration | The configuration to issue a get request for.

Returns
  An executable instance of class Request.

## streaming_head()

virtual std::shared_ptr< StreamingRequest > core::net::http::StreamingClient::streaming_head | ( | const Request::Configuration & | configuration | ) |

pure virtual

streaming_head is a convenience method for issueing a HEAD request for the given URI.

Exceptions

  Errors::HttpMethodNotSupported | if the underlying implementation does not support the provided HTTP method.

Parameters

  configuration | The configuration to issue a get request for.

Returns
  An executable instance of class Request.

## streaming_post() [1/3]

virtual std::shared_ptr< StreamingRequest > core::net::http::StreamingClient::streaming_post | ( | const Request::Configuration & | configuration,
|  | const std::string & | payload,
|  | const std::string & | type )

pure virtual

streaming_post is a convenience method for issuing a POST request for the given URI.

Exceptions

  Errors::HttpMethodNotSupported | if the underlying implementation does not support the provided HTTP method.

Parameters

  configuration | The configuration to issue a get request for.
  payload | The data to be transmitted as part of the POST request.
  type | The content-type of the data.

Returns
  An executable instance of class Request.

## streaming_post() [2/3]

virtual std::shared_ptr< StreamingRequest > core::net::http::StreamingClient::streaming_post | ( | const Request::Configuration & | configuration,
|  | std::function< size_t(void *dest, std::size_t buf_size)> | readdata_callback,
|  | std::size_t | size )

pure virtual

streaming_post is a convenience method for issuing a POST request for the given URI.

Exceptions

  Errors::HttpMethodNotSupported | if the underlying implementation does not support the pro vided HTTP method.

Parameters

  configuration | The configuration to issue a get request for.
  readdata_callback | The callback function to read data in order to send it to the peer. The data area pointed at by the pointer dest should be filled up with at most buf_size number of bytes.
  size | Size of the payload data in bytes.

Returns
  An executable instance of class Request.

## streaming_post() [3/3]

virtual std::shared_ptr< StreamingRequest > core::net::http::StreamingClient::streaming_post | ( | const Request::Configuration & | configuration,
|  | std::istream & | payload,
|  | std::size_t | size )

pure virtual

streaming_post is a convenience method for issuing a POST request for the given URI.

Exceptions

  Errors::HttpMethodNotSupported | if the underlying implementation does not support the pro vided HTTP method.

Parameters

  configuration | The configuration to issue a get request for.
  payload | The data to be transmitted as part of the POST request.
  size | Size of the payload data in bytes.

Returns
  An executable instance of class Request.

## streaming_post_form()

virtual std::shared_ptr< StreamingRequest > core::net::http::StreamingClient::streaming_post_form | ( | const Request::Configuration & | configuration,
|  | const std::map< std::string, std::string > & | values )

pure virtual

streaming_post_form is a convenience method for issuing a POST request for the given URI, with url-encoded payload.

Exceptions

  Errors::HttpMethodNotSupported | if the underlying implementation does not support the provided HTTP method.

Parameters

  configuration | The configuration to issue a get request for.
  values | Key-value pairs to be added to the payload in url-encoded format.

Returns
  An executable instance of class Request.

## streaming_put() [1/2]

virtual std::shared_ptr< StreamingRequest > core::net::http::StreamingClient::streaming_put | ( | const Request::Configuration & | configuration,
|  | std::function< size_t(void *dest, std::size_t buf_size)> | readdata_callback,
|  | std::size_t | size )

pure virtual

streaming_put is a convenience method for issuing a PUT request for the given URI.

Exceptions

  Errors::HttpMethodNotSupported | if the underlying implementation does not support the provided HTTP method.

Parameters

  configuration | The configuration to issue a get request for.
  readdata_callback | The callback function to read data in order to send it to the peer. The data area pointed at by the pointer dest should be filled up with at most buf_size number of bytes.
  size | Size of the payload data in bytes.

Returns
  An executable instance of class Request.

## streaming_put() [2/2]

virtual std::shared_ptr< StreamingRequest > core::net::http::StreamingClient::streaming_put | ( | const Request::Configuration & | configuration,
|  | std::istream & | payload,
|  | std::size_t | size )

pure virtual

streaming_put is a convenience method for issuing a PUT request for the given URI.

Exceptions

  Errors::HttpMethodNotSupported | if the underlying implementation does not support the provided HTTP method.

Parameters

  configuration | The configuration to issue a get request for.
  payload | The data to be transmitted as part of the PUT request.
  size | Size of the payload data in bytes.

Returns
  An executable instance of class Request.

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

- streaming_client.h