|
join 1.0
lightweight network framework library
|
basic HTTPS client. More...
#include <httpclient.hpp>


Public Types | |
| using | Endpoint = typename Protocol::Endpoint |
Public Types inherited from join::BasicHttpClient< Protocol > | |
| using | Endpoint = typename Protocol::Endpoint |
Public Member Functions | |
| BasicHttpSecureClient (const char *host, uint16_t port=443, bool keepAlive=true) | |
| create the basic HTTPS client instance. | |
| BasicHttpSecureClient (const std::string &host, uint16_t port=443, bool keepAlive=true) | |
| create the basic HTTPS client instance. | |
| BasicHttpSecureClient (const BasicHttpSecureClient &other)=delete | |
| create the basic HTTPS client instance by copy. | |
| BasicHttpSecureClient & | operator= (const BasicHttpSecureClient &other)=delete |
| assign the basic HTTPS client instance by copy. | |
| BasicHttpSecureClient (BasicHttpSecureClient &&other) | |
| create the basic HTTPS client instance by move. | |
| BasicHttpSecureClient & | operator= (BasicHttpSecureClient &&other) |
| assign the basic HTTPS client instance by move. | |
| virtual | ~BasicHttpSecureClient ()=default |
| destroy the basic HTTPS client instance. | |
| std::string | scheme () const override |
| get HTTP scheme. | |
Public Member Functions inherited from join::BasicHttpClient< Protocol > | |
| BasicHttpClient (const char *host, uint16_t port=80, bool keepAlive=true) | |
| create the basic HTTP client instance. | |
| BasicHttpClient (const std::string &host, uint16_t port=80, bool keepAlive=true) | |
| create the basic HTTP client instance. | |
| BasicHttpClient (const BasicHttpClient &other)=delete | |
| create the basic HTTP client instance by copy. | |
| BasicHttpClient & | operator= (const BasicHttpClient &other)=delete |
| assign the basic HTTP client instance by copy. | |
| BasicHttpClient (BasicHttpClient &&other) | |
| create the basic HTTP client instance by move. | |
| BasicHttpClient & | operator= (BasicHttpClient &&other) |
| assign the basic HTTP client instance by move. | |
| virtual | ~BasicHttpClient () |
| destroy the basic HTTP client instance. | |
| void | close () override |
| close the connection. | |
| const std::string & | host () const |
| get host. | |
| uint16_t | port () const |
| get port. | |
| std::string | authority () const |
| get authority. | |
| std::string | url () const |
| get URL. | |
| bool | keepAlive () const |
| checks if HTTP keep alive is supported. | |
| void | keepAlive (bool keep) |
| enable/disable HTTP keep alive support. | |
| std::chrono::seconds | keepAliveTimeout () const |
| get HTTP keep alive timeout. | |
| int | keepAliveMax () const |
| get HTTP keep alive max. | |
| int | send (HttpRequest &request) |
| send HTTP request. | |
| int | receive (HttpResponse &response) |
| receive HTTP response. | |
Protected Member Functions | |
| void | reconnect (const Endpoint &endpoint) override |
| perform reconnection to the given endpoint. | |
Protected Member Functions inherited from join::BasicHttpClient< Protocol > | |
| void | setEncoding (const std::vector< std::string > &encodings) |
| set stream encoding. | |
| void | clearEncoding () |
| clear stream encoding. | |
| bool | expired () const |
| check if HTTP keep alive is expired. | |
| bool | needReconnection () |
| check if client must reconnect. | |
Additional Inherited Members | |
Protected Attributes inherited from join::BasicHttpClient< Protocol > | |
| std::streambuf * | _streambuf = nullptr |
| HTTP stream buffer. | |
| bool | _wrapped = false |
| HTTP stream status. | |
| std::chrono::time_point< std::chrono::steady_clock > | _timestamp |
| HTTP timestamp. | |
| std::string | _host |
| HTTP host. | |
| uint16_t | _port |
| HTTP port. | |
| bool | _keep |
| HTTP keep alive. | |
| std::chrono::seconds | _keepTimeout |
| HTTP keep alive timeout. | |
| int | _keepMax = -1 |
| HTTP keep alive max. | |
basic HTTPS client.
| using join::BasicHttpSecureClient< Protocol >::Endpoint = typename Protocol::Endpoint |
|
inline |
create the basic HTTPS client instance.
| host | host. |
| port | port (default: 443). |
| keepAlive | use a persistent connection. |
|
inline |
create the basic HTTPS client instance.
| host | host. |
| port | port (default: 443). |
| keepAlive | use a persistent connection. |
|
delete |
create the basic HTTPS client instance by copy.
| other | request to copy. |
|
inline |
create the basic HTTPS client instance by move.
| other | request to move. |
|
virtualdefault |
destroy the basic HTTPS client instance.
|
inline |
assign the basic HTTPS client instance by move.
| other | request to move. |
|
delete |
assign the basic HTTPS client instance by copy.
| other | request to copy. |
|
inlineoverrideprotectedvirtual |
perform reconnection to the given endpoint.
| endpoint | endpoint to connect to. |
Reimplemented from join::BasicHttpClient< Protocol >.
|
inlineoverridevirtual |