A simple HTTPS client. More...
#include <HttpsClient.hpp>
Public Member Functions | |
HttpsClient (std::string host_, unsigned short port_=443, std::string userAgent_="Balau "+BalauVersion, const char *version_="1.1") | |
Create an HTTPS client instance. More... | |
HttpsClient (const HttpsClient &)=default | |
Create an HTTPS client by copying the supplied instance. More... | |
HttpsClient (HttpsClient &&)=default | |
Create an HTTPS client by moving the contents of the supplied instance. More... | |
CharVectorResponse | get (const std::string_view &path) override |
Perform a GET request. More... | |
EmptyResponse | head (const std::string_view &path) override |
Perform a HEAD request. More... | |
HttpsClient & | operator= (const HttpsClient &)=default |
Assign an HTTPS client by copying the supplied instance. More... | |
HttpsClient & | operator= (HttpsClient &&)=default |
Assign an HTTPS client by moving the contents of the supplied instance. More... | |
CharVectorResponse | post (const std::string_view &path, const std::string_view &body) override |
Perform a POST request. More... | |
Public Member Functions inherited from HttpClient | |
HttpClient (std::string host_, unsigned short port_=80, std::string userAgent_="Balau "+BalauVersion, const char *version_="1.1") | |
Create an HTTP client instance. More... | |
HttpClient (const HttpClient &)=default | |
Create an HTTP client by copying the supplied instance. More... | |
HttpClient (HttpClient &&)=default | |
Create an HTTP client by moving the contents of the supplied instance. More... | |
virtual | ~HttpClient ()=default |
Destroy the client instance. More... | |
HttpClient & | operator= (const HttpClient &)=default |
Assign an HTTP client by copying the supplied instance. More... | |
HttpClient & | operator= (HttpClient &&)=default |
Assign an HTTP client by moving the contents of the supplied instance. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from HttpClient | |
static std::unique_ptr< HttpClient > | newClient (const Resource::Url &url, std::string userAgent="Balau "+BalauVersion, const char *version="1.1") |
Create a new HTTP or HTTPS client, according to the supplied URL. More... | |
static std::unique_ptr< HttpClient > | newClient (const std::string &url, std::string userAgent="Balau "+BalauVersion, const char *version="1.1") |
Create a new HTTP or HTTPS client, according to the supplied URL string. More... | |
A simple HTTPS client.
The HTTPS client derives from the HTTP client in order to allow polymorphic usage via a pointer container.
|
inlineexplicit |
Create an HTTPS client instance.
host_ | the host name to connect to |
port_ | the port number to connect to |
version_ | either "1.0" or "1.1" (the default) |
userAgent_ | the user agent string to send |
|
default |
Create an HTTPS client by copying the supplied instance.
|
default |
Create an HTTPS client by moving the contents of the supplied instance.
|
inlineoverridevirtual |
Perform a GET request.
Reimplemented from HttpClient.
|
inlineoverridevirtual |
Perform a HEAD request.
Reimplemented from HttpClient.
|
default |
Assign an HTTPS client by copying the supplied instance.
|
default |
Assign an HTTPS client by moving the contents of the supplied instance.
|
inlineoverridevirtual |
Perform a POST request.
Reimplemented from HttpClient.