Project Alice
Loading...
Searching...
No Matches
httplib::ClientImpl Class Reference

#include <httplib.h>

Collaboration diagram for httplib::ClientImpl:

Classes

struct  Socket
 

Public Member Functions

 ClientImpl (const std::string &host)
 
 ClientImpl (const std::string &host, int port)
 
 ClientImpl (const std::string &host, int port, const std::string &client_cert_path, const std::string &client_key_path)
 
virtual ~ClientImpl ()
 
virtual bool is_valid () const
 
Result Get (const std::string &path)
 
Result Get (const std::string &path, const Headers &headers)
 
Result Get (const std::string &path, Progress progress)
 
Result Get (const std::string &path, const Headers &headers, Progress progress)
 
Result Get (const std::string &path, ContentReceiver content_receiver)
 
Result Get (const std::string &path, const Headers &headers, ContentReceiver content_receiver)
 
Result Get (const std::string &path, ContentReceiver content_receiver, Progress progress)
 
Result Get (const std::string &path, const Headers &headers, ContentReceiver content_receiver, Progress progress)
 
Result Get (const std::string &path, ResponseHandler response_handler, ContentReceiver content_receiver)
 
Result Get (const std::string &path, const Headers &headers, ResponseHandler response_handler, ContentReceiver content_receiver)
 
Result Get (const std::string &path, ResponseHandler response_handler, ContentReceiver content_receiver, Progress progress)
 
Result Get (const std::string &path, const Headers &headers, ResponseHandler response_handler, ContentReceiver content_receiver, Progress progress)
 
Result Get (const std::string &path, const Params &params, const Headers &headers, Progress progress=nullptr)
 
Result Get (const std::string &path, const Params &params, const Headers &headers, ContentReceiver content_receiver, Progress progress=nullptr)
 
Result Get (const std::string &path, const Params &params, const Headers &headers, ResponseHandler response_handler, ContentReceiver content_receiver, Progress progress=nullptr)
 
Result Head (const std::string &path)
 
Result Head (const std::string &path, const Headers &headers)
 
Result Post (const std::string &path)
 
Result Post (const std::string &path, const Headers &headers)
 
Result Post (const std::string &path, const char *body, size_t content_length, const std::string &content_type)
 
Result Post (const std::string &path, const Headers &headers, const char *body, size_t content_length, const std::string &content_type)
 
Result Post (const std::string &path, const Headers &headers, const char *body, size_t content_length, const std::string &content_type, Progress progress)
 
Result Post (const std::string &path, const std::string &body, const std::string &content_type)
 
Result Post (const std::string &path, const std::string &body, const std::string &content_type, Progress progress)
 
Result Post (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type)
 
Result Post (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type, Progress progress)
 
Result Post (const std::string &path, size_t content_length, ContentProvider content_provider, const std::string &content_type)
 
Result Post (const std::string &path, ContentProviderWithoutLength content_provider, const std::string &content_type)
 
Result Post (const std::string &path, const Headers &headers, size_t content_length, ContentProvider content_provider, const std::string &content_type)
 
Result Post (const std::string &path, const Headers &headers, ContentProviderWithoutLength content_provider, const std::string &content_type)
 
Result Post (const std::string &path, const Params &params)
 
Result Post (const std::string &path, const Headers &headers, const Params &params)
 
Result Post (const std::string &path, const Headers &headers, const Params &params, Progress progress)
 
Result Post (const std::string &path, const MultipartFormDataItems &items)
 
Result Post (const std::string &path, const Headers &headers, const MultipartFormDataItems &items)
 
Result Post (const std::string &path, const Headers &headers, const MultipartFormDataItems &items, const std::string &boundary)
 
Result Post (const std::string &path, const Headers &headers, const MultipartFormDataItems &items, const MultipartFormDataProviderItems &provider_items)
 
Result Put (const std::string &path)
 
Result Put (const std::string &path, const char *body, size_t content_length, const std::string &content_type)
 
Result Put (const std::string &path, const Headers &headers, const char *body, size_t content_length, const std::string &content_type)
 
Result Put (const std::string &path, const Headers &headers, const char *body, size_t content_length, const std::string &content_type, Progress progress)
 
Result Put (const std::string &path, const std::string &body, const std::string &content_type)
 
Result Put (const std::string &path, const std::string &body, const std::string &content_type, Progress progress)
 
Result Put (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type)
 
Result Put (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type, Progress progress)
 
Result Put (const std::string &path, size_t content_length, ContentProvider content_provider, const std::string &content_type)
 
Result Put (const std::string &path, ContentProviderWithoutLength content_provider, const std::string &content_type)
 
Result Put (const std::string &path, const Headers &headers, size_t content_length, ContentProvider content_provider, const std::string &content_type)
 
Result Put (const std::string &path, const Headers &headers, ContentProviderWithoutLength content_provider, const std::string &content_type)
 
Result Put (const std::string &path, const Params &params)
 
Result Put (const std::string &path, const Headers &headers, const Params &params)
 
Result Put (const std::string &path, const Headers &headers, const Params &params, Progress progress)
 
Result Put (const std::string &path, const MultipartFormDataItems &items)
 
Result Put (const std::string &path, const Headers &headers, const MultipartFormDataItems &items)
 
Result Put (const std::string &path, const Headers &headers, const MultipartFormDataItems &items, const std::string &boundary)
 
Result Put (const std::string &path, const Headers &headers, const MultipartFormDataItems &items, const MultipartFormDataProviderItems &provider_items)
 
Result Patch (const std::string &path)
 
Result Patch (const std::string &path, const char *body, size_t content_length, const std::string &content_type)
 
Result Patch (const std::string &path, const char *body, size_t content_length, const std::string &content_type, Progress progress)
 
Result Patch (const std::string &path, const Headers &headers, const char *body, size_t content_length, const std::string &content_type)
 
Result Patch (const std::string &path, const Headers &headers, const char *body, size_t content_length, const std::string &content_type, Progress progress)
 
Result Patch (const std::string &path, const std::string &body, const std::string &content_type)
 
Result Patch (const std::string &path, const std::string &body, const std::string &content_type, Progress progress)
 
Result Patch (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type)
 
Result Patch (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type, Progress progress)
 
Result Patch (const std::string &path, size_t content_length, ContentProvider content_provider, const std::string &content_type)
 
Result Patch (const std::string &path, ContentProviderWithoutLength content_provider, const std::string &content_type)
 
Result Patch (const std::string &path, const Headers &headers, size_t content_length, ContentProvider content_provider, const std::string &content_type)
 
Result Patch (const std::string &path, const Headers &headers, ContentProviderWithoutLength content_provider, const std::string &content_type)
 
Result Delete (const std::string &path)
 
Result Delete (const std::string &path, const Headers &headers)
 
Result Delete (const std::string &path, const char *body, size_t content_length, const std::string &content_type)
 
Result Delete (const std::string &path, const char *body, size_t content_length, const std::string &content_type, Progress progress)
 
Result Delete (const std::string &path, const Headers &headers, const char *body, size_t content_length, const std::string &content_type)
 
Result Delete (const std::string &path, const Headers &headers, const char *body, size_t content_length, const std::string &content_type, Progress progress)
 
Result Delete (const std::string &path, const std::string &body, const std::string &content_type)
 
Result Delete (const std::string &path, const std::string &body, const std::string &content_type, Progress progress)
 
Result Delete (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type)
 
Result Delete (const std::string &path, const Headers &headers, const std::string &body, const std::string &content_type, Progress progress)
 
Result Options (const std::string &path)
 
Result Options (const std::string &path, const Headers &headers)
 
bool send (Request &req, Response &res, Error &error)
 
Result send (const Request &req)
 
void stop ()
 
std::string host () const
 
int port () const
 
size_t is_socket_open () const
 
socket_t socket () const
 
void set_hostname_addr_map (std::map< std::string, std::string > addr_map)
 
void set_default_headers (Headers headers)
 
void set_header_writer (std::function< ssize_t(Stream &, Headers &)> const &writer)
 
void set_address_family (int family)
 
void set_tcp_nodelay (bool on)
 
void set_ipv6_v6only (bool on)
 
void set_socket_options (SocketOptions socket_options)
 
void set_connection_timeout (time_t sec, time_t usec=0)
 
template<class Rep , class Period >
void set_connection_timeout (const std::chrono::duration< Rep, Period > &duration)
 
void set_read_timeout (time_t sec, time_t usec=0)
 
template<class Rep , class Period >
void set_read_timeout (const std::chrono::duration< Rep, Period > &duration)
 
void set_write_timeout (time_t sec, time_t usec=0)
 
template<class Rep , class Period >
void set_write_timeout (const std::chrono::duration< Rep, Period > &duration)
 
void set_basic_auth (const std::string &username, const std::string &password)
 
void set_bearer_token_auth (const std::string &token)
 
void set_keep_alive (bool on)
 
void set_follow_location (bool on)
 
void set_url_encode (bool on)
 
void set_compress (bool on)
 
void set_decompress (bool on)
 
void set_interface (const std::string &intf)
 
void set_proxy (const std::string &host, int port)
 
void set_proxy_basic_auth (const std::string &username, const std::string &password)
 
void set_proxy_bearer_token_auth (const std::string &token)
 
void set_logger (Logger logger)
 

Protected Member Functions

virtual bool create_and_connect_socket (Socket &socket, Error &error)
 
virtual void shutdown_ssl (Socket &socket, bool shutdown_gracefully)
 
void shutdown_socket (Socket &socket) const
 
void close_socket (Socket &socket)
 
bool process_request (Stream &strm, Request &req, Response &res, bool close_connection, Error &error)
 
bool write_content_with_provider (Stream &strm, const Request &req, Error &error) const
 
void copy_settings (const ClientImpl &rhs)
 

Protected Attributes

const std::string host_
 
const int port_
 
const std::string host_and_port_
 
Socket socket_
 
std::mutex socket_mutex_
 
std::recursive_mutex request_mutex_
 
size_t socket_requests_in_flight_ = 0
 
std::thread::id socket_requests_are_from_thread_ = std::thread::id()
 
bool socket_should_be_closed_when_request_is_done_ = false
 
std::map< std::string, std::string > addr_map_
 
Headers default_headers_
 
std::function< ssize_t(Stream &, Headers &)> header_writer_
 
std::string client_cert_path_
 
std::string client_key_path_
 
time_t connection_timeout_sec_ = CPPHTTPLIB_CONNECTION_TIMEOUT_SECOND
 
time_t connection_timeout_usec_ = CPPHTTPLIB_CONNECTION_TIMEOUT_USECOND
 
time_t read_timeout_sec_ = CPPHTTPLIB_CLIENT_READ_TIMEOUT_SECOND
 
time_t read_timeout_usec_ = CPPHTTPLIB_CLIENT_READ_TIMEOUT_USECOND
 
time_t write_timeout_sec_ = CPPHTTPLIB_CLIENT_WRITE_TIMEOUT_SECOND
 
time_t write_timeout_usec_ = CPPHTTPLIB_CLIENT_WRITE_TIMEOUT_USECOND
 
std::string basic_auth_username_
 
std::string basic_auth_password_
 
std::string bearer_token_auth_token_
 
bool keep_alive_ = false
 
bool follow_location_ = false
 
bool url_encode_ = true
 
int address_family_ = AF_UNSPEC
 
bool tcp_nodelay_ = CPPHTTPLIB_TCP_NODELAY
 
bool ipv6_v6only_ = CPPHTTPLIB_IPV6_V6ONLY
 
SocketOptions socket_options_ = nullptr
 
bool compress_ = false
 
bool decompress_ = true
 
std::string interface_
 
std::string proxy_host_
 
int proxy_port_ = -1
 
std::string proxy_basic_auth_username_
 
std::string proxy_basic_auth_password_
 
std::string proxy_bearer_token_auth_token_
 
Logger logger_
 

Detailed Description

Definition at line 1200 of file httplib.h.

Constructor & Destructor Documentation

◆ ClientImpl() [1/3]

httplib::ClientImpl::ClientImpl ( const std::string &  host)
inlineexplicit

Definition at line 7349 of file httplib.h.

◆ ClientImpl() [2/3]

httplib::ClientImpl::ClientImpl ( const std::string &  host,
int  port 
)
inlineexplicit

Definition at line 7352 of file httplib.h.

◆ ClientImpl() [3/3]

httplib::ClientImpl::ClientImpl ( const std::string &  host,
int  port,
const std::string &  client_cert_path,
const std::string &  client_key_path 
)
inlineexplicit

Definition at line 7355 of file httplib.h.

◆ ~ClientImpl()

httplib::ClientImpl::~ClientImpl ( )
inlinevirtual

Definition at line 7362 of file httplib.h.

Here is the call graph for this function:

Member Function Documentation

◆ close_socket()

void httplib::ClientImpl::close_socket ( Socket socket)
inlineprotected

Definition at line 7459 of file httplib.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_settings()

void httplib::ClientImpl::copy_settings ( const ClientImpl rhs)
inlineprotected

Definition at line 7370 of file httplib.h.

◆ create_and_connect_socket()

bool httplib::ClientImpl::create_and_connect_socket ( Socket socket,
Error error 
)
inlineprotectedvirtual

Definition at line 7438 of file httplib.h.

Here is the call graph for this function:

◆ Delete() [1/10]

Result httplib::ClientImpl::Delete ( const std::string &  path)
inline

Definition at line 8685 of file httplib.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Delete() [2/10]

Result httplib::ClientImpl::Delete ( const std::string &  path,
const char *  body,
size_t  content_length,
const std::string &  content_type 
)
inline

Definition at line 8694 of file httplib.h.

Here is the call graph for this function:

◆ Delete() [3/10]

Result httplib::ClientImpl::Delete ( const std::string &  path,
const char *  body,
size_t  content_length,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8700 of file httplib.h.

Here is the call graph for this function:

◆ Delete() [4/10]

Result httplib::ClientImpl::Delete ( const std::string &  path,
const Headers headers 
)
inline

Definition at line 8689 of file httplib.h.

Here is the call graph for this function:

◆ Delete() [5/10]

Result httplib::ClientImpl::Delete ( const std::string &  path,
const Headers headers,
const char *  body,
size_t  content_length,
const std::string &  content_type 
)
inline

Definition at line 8707 of file httplib.h.

Here is the call graph for this function:

◆ Delete() [6/10]

Result httplib::ClientImpl::Delete ( const std::string &  path,
const Headers headers,
const char *  body,
size_t  content_length,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8714 of file httplib.h.

◆ Delete() [7/10]

Result httplib::ClientImpl::Delete ( const std::string &  path,
const Headers headers,
const std::string &  body,
const std::string &  content_type 
)
inline

Definition at line 8745 of file httplib.h.

Here is the call graph for this function:

◆ Delete() [8/10]

Result httplib::ClientImpl::Delete ( const std::string &  path,
const Headers headers,
const std::string &  body,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8752 of file httplib.h.

Here is the call graph for this function:

◆ Delete() [9/10]

Result httplib::ClientImpl::Delete ( const std::string &  path,
const std::string &  body,
const std::string &  content_type 
)
inline

Definition at line 8731 of file httplib.h.

Here is the call graph for this function:

◆ Delete() [10/10]

Result httplib::ClientImpl::Delete ( const std::string &  path,
const std::string &  body,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8737 of file httplib.h.

Here is the call graph for this function:

◆ Get() [1/15]

Result httplib::ClientImpl::Get ( const std::string &  path)
inline

Definition at line 8178 of file httplib.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Get() [2/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
const Headers headers 
)
inline

Definition at line 8186 of file httplib.h.

Here is the call graph for this function:

◆ Get() [3/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
const Headers headers,
ContentReceiver  content_receiver 
)
inline

Definition at line 8213 of file httplib.h.

Here is the call graph for this function:

◆ Get() [4/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
const Headers headers,
ContentReceiver  content_receiver,
Progress  progress 
)
inline

Definition at line 8218 of file httplib.h.

Here is the call graph for this function:

◆ Get() [5/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
const Headers headers,
Progress  progress 
)
inline

Definition at line 8190 of file httplib.h.

◆ Get() [6/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
const Headers headers,
ResponseHandler  response_handler,
ContentReceiver  content_receiver 
)
inline

Definition at line 8232 of file httplib.h.

Here is the call graph for this function:

◆ Get() [7/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
const Headers headers,
ResponseHandler  response_handler,
ContentReceiver  content_receiver,
Progress  progress 
)
inline

Definition at line 8247 of file httplib.h.

◆ Get() [8/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
const Params params,
const Headers headers,
ContentReceiver  content_receiver,
Progress  progress = nullptr 
)
inline

Definition at line 8274 of file httplib.h.

Here is the call graph for this function:

◆ Get() [9/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
const Params params,
const Headers headers,
Progress  progress = nullptr 
)
inline

Definition at line 8266 of file httplib.h.

Here is the call graph for this function:

◆ Get() [10/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
const Params params,
const Headers headers,
ResponseHandler  response_handler,
ContentReceiver  content_receiver,
Progress  progress = nullptr 
)
inline

Definition at line 8282 of file httplib.h.

Here is the call graph for this function:

◆ Get() [11/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
ContentReceiver  content_receiver 
)
inline

Definition at line 8201 of file httplib.h.

Here is the call graph for this function:

◆ Get() [12/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
ContentReceiver  content_receiver,
Progress  progress 
)
inline

Definition at line 8206 of file httplib.h.

Here is the call graph for this function:

◆ Get() [13/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
Progress  progress 
)
inline

Definition at line 8182 of file httplib.h.

Here is the call graph for this function:

◆ Get() [14/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
ResponseHandler  response_handler,
ContentReceiver  content_receiver 
)
inline

Definition at line 8225 of file httplib.h.

Here is the call graph for this function:

◆ Get() [15/15]

Result httplib::ClientImpl::Get ( const std::string &  path,
ResponseHandler  response_handler,
ContentReceiver  content_receiver,
Progress  progress 
)
inline

Definition at line 8239 of file httplib.h.

Here is the call graph for this function:

◆ Head() [1/2]

Result httplib::ClientImpl::Head ( const std::string &  path)
inline

Definition at line 8297 of file httplib.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Head() [2/2]

Result httplib::ClientImpl::Head ( const std::string &  path,
const Headers headers 
)
inline

Definition at line 8301 of file httplib.h.

◆ host()

std::string httplib::ClientImpl::host ( ) const
inline

Definition at line 8798 of file httplib.h.

Here is the caller graph for this function:

◆ is_socket_open()

size_t httplib::ClientImpl::is_socket_open ( ) const
inline

Definition at line 8802 of file httplib.h.

Here is the call graph for this function:

◆ is_valid()

bool httplib::ClientImpl::is_valid ( ) const
inlinevirtual

Definition at line 7368 of file httplib.h.

◆ Options() [1/2]

Result httplib::ClientImpl::Options ( const std::string &  path)
inline

Definition at line 8761 of file httplib.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Options() [2/2]

Result httplib::ClientImpl::Options ( const std::string &  path,
const Headers headers 
)
inline

Definition at line 8765 of file httplib.h.

◆ Patch() [1/13]

Result httplib::ClientImpl::Patch ( const std::string &  path)
inline

Definition at line 8595 of file httplib.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Patch() [2/13]

Result httplib::ClientImpl::Patch ( const std::string &  path,
const char *  body,
size_t  content_length,
const std::string &  content_type 
)
inline

Definition at line 8599 of file httplib.h.

Here is the call graph for this function:

◆ Patch() [3/13]

Result httplib::ClientImpl::Patch ( const std::string &  path,
const char *  body,
size_t  content_length,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8605 of file httplib.h.

Here is the call graph for this function:

◆ Patch() [4/13]

Result httplib::ClientImpl::Patch ( const std::string &  path,
const Headers headers,
const char *  body,
size_t  content_length,
const std::string &  content_type 
)
inline

Definition at line 8612 of file httplib.h.

Here is the call graph for this function:

◆ Patch() [5/13]

Result httplib::ClientImpl::Patch ( const std::string &  path,
const Headers headers,
const char *  body,
size_t  content_length,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8618 of file httplib.h.

◆ Patch() [6/13]

Result httplib::ClientImpl::Patch ( const std::string &  path,
const Headers headers,
const std::string &  body,
const std::string &  content_type 
)
inline

Definition at line 8640 of file httplib.h.

Here is the call graph for this function:

◆ Patch() [7/13]

Result httplib::ClientImpl::Patch ( const std::string &  path,
const Headers headers,
const std::string &  body,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8646 of file httplib.h.

◆ Patch() [8/13]

Result httplib::ClientImpl::Patch ( const std::string &  path,
const Headers headers,
ContentProviderWithoutLength  content_provider,
const std::string &  content_type 
)
inline

Definition at line 8677 of file httplib.h.

◆ Patch() [9/13]

Result httplib::ClientImpl::Patch ( const std::string &  path,
const Headers headers,
size_t  content_length,
ContentProvider  content_provider,
const std::string &  content_type 
)
inline

Definition at line 8668 of file httplib.h.

◆ Patch() [10/13]

Result httplib::ClientImpl::Patch ( const std::string &  path,
const std::string &  body,
const std::string &  content_type 
)
inline

Definition at line 8627 of file httplib.h.

Here is the call graph for this function:

◆ Patch() [11/13]

Result httplib::ClientImpl::Patch ( const std::string &  path,
const std::string &  body,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8633 of file httplib.h.

Here is the call graph for this function:

◆ Patch() [12/13]

Result httplib::ClientImpl::Patch ( const std::string &  path,
ContentProviderWithoutLength  content_provider,
const std::string &  content_type 
)
inline

Definition at line 8662 of file httplib.h.

Here is the call graph for this function:

◆ Patch() [13/13]

Result httplib::ClientImpl::Patch ( const std::string &  path,
size_t  content_length,
ContentProvider  content_provider,
const std::string &  content_type 
)
inline

Definition at line 8655 of file httplib.h.

Here is the call graph for this function:

◆ port()

int httplib::ClientImpl::port ( ) const
inline

Definition at line 8800 of file httplib.h.

Here is the caller graph for this function:

◆ Post() [1/20]

Result httplib::ClientImpl::Post ( const std::string &  path)
inline

Definition at line 8311 of file httplib.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Post() [2/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const char *  body,
size_t  content_length,
const std::string &  content_type 
)
inline

Definition at line 8320 of file httplib.h.

Here is the call graph for this function:

◆ Post() [3/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const Headers headers 
)
inline

Definition at line 8315 of file httplib.h.

Here is the call graph for this function:

◆ Post() [4/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const Headers headers,
const char *  body,
size_t  content_length,
const std::string &  content_type 
)
inline

Definition at line 8326 of file httplib.h.

◆ Post() [5/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const Headers headers,
const char *  body,
size_t  content_length,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8333 of file httplib.h.

◆ Post() [6/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const Headers headers,
const MultipartFormDataItems items 
)
inline

Definition at line 8421 of file httplib.h.

Here is the call graph for this function:

◆ Post() [7/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const Headers headers,
const MultipartFormDataItems items,
const MultipartFormDataProviderItems provider_items 
)
inline

Definition at line 8444 of file httplib.h.

Here is the call graph for this function:

◆ Post() [8/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const Headers headers,
const MultipartFormDataItems items,
const std::string &  boundary 
)
inline

Definition at line 8430 of file httplib.h.

Here is the call graph for this function:

◆ Post() [9/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const Headers headers,
const Params params 
)
inline

Definition at line 8403 of file httplib.h.

Here is the call graph for this function:

◆ Post() [10/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const Headers headers,
const Params params,
Progress  progress 
)
inline

Definition at line 8409 of file httplib.h.

Here is the call graph for this function:

◆ Post() [11/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const Headers headers,
const std::string &  body,
const std::string &  content_type 
)
inline

Definition at line 8352 of file httplib.h.

◆ Post() [12/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const Headers headers,
const std::string &  body,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8360 of file httplib.h.

◆ Post() [13/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const Headers headers,
ContentProviderWithoutLength  content_provider,
const std::string &  content_type 
)
inline

Definition at line 8395 of file httplib.h.

◆ Post() [14/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const Headers headers,
size_t  content_length,
ContentProvider  content_provider,
const std::string &  content_type 
)
inline

Definition at line 8386 of file httplib.h.

◆ Post() [15/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const MultipartFormDataItems items 
)
inline

Definition at line 8416 of file httplib.h.

Here is the call graph for this function:

◆ Post() [16/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const Params params 
)
inline

Definition at line 8369 of file httplib.h.

Here is the call graph for this function:

◆ Post() [17/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const std::string &  body,
const std::string &  content_type 
)
inline

Definition at line 8341 of file httplib.h.

Here is the call graph for this function:

◆ Post() [18/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
const std::string &  body,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8346 of file httplib.h.

Here is the call graph for this function:

◆ Post() [19/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
ContentProviderWithoutLength  content_provider,
const std::string &  content_type 
)
inline

Definition at line 8380 of file httplib.h.

Here is the call graph for this function:

◆ Post() [20/20]

Result httplib::ClientImpl::Post ( const std::string &  path,
size_t  content_length,
ContentProvider  content_provider,
const std::string &  content_type 
)
inline

Definition at line 8373 of file httplib.h.

Here is the call graph for this function:

◆ process_request()

bool httplib::ClientImpl::process_request ( Stream strm,
Request req,
Response res,
bool  close_connection,
Error error 
)
inlineprotected

Definition at line 8038 of file httplib.h.

Here is the call graph for this function:

◆ Put() [1/19]

Result httplib::ClientImpl::Put ( const std::string &  path)
inline

Definition at line 8456 of file httplib.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Put() [2/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const char *  body,
size_t  content_length,
const std::string &  content_type 
)
inline

Definition at line 8460 of file httplib.h.

Here is the call graph for this function:

◆ Put() [3/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const Headers headers,
const char *  body,
size_t  content_length,
const std::string &  content_type 
)
inline

Definition at line 8466 of file httplib.h.

◆ Put() [4/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const Headers headers,
const char *  body,
size_t  content_length,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8473 of file httplib.h.

◆ Put() [5/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const Headers headers,
const MultipartFormDataItems items 
)
inline

Definition at line 8561 of file httplib.h.

Here is the call graph for this function:

◆ Put() [6/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const Headers headers,
const MultipartFormDataItems items,
const MultipartFormDataProviderItems provider_items 
)
inline

Definition at line 8584 of file httplib.h.

Here is the call graph for this function:

◆ Put() [7/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const Headers headers,
const MultipartFormDataItems items,
const std::string &  boundary 
)
inline

Definition at line 8570 of file httplib.h.

Here is the call graph for this function:

◆ Put() [8/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const Headers headers,
const Params params 
)
inline

Definition at line 8543 of file httplib.h.

Here is the call graph for this function:

◆ Put() [9/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const Headers headers,
const Params params,
Progress  progress 
)
inline

Definition at line 8549 of file httplib.h.

Here is the call graph for this function:

◆ Put() [10/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const Headers headers,
const std::string &  body,
const std::string &  content_type 
)
inline

Definition at line 8492 of file httplib.h.

◆ Put() [11/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const Headers headers,
const std::string &  body,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8500 of file httplib.h.

◆ Put() [12/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const Headers headers,
ContentProviderWithoutLength  content_provider,
const std::string &  content_type 
)
inline

Definition at line 8531 of file httplib.h.

◆ Put() [13/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const Headers headers,
size_t  content_length,
ContentProvider  content_provider,
const std::string &  content_type 
)
inline

Definition at line 8522 of file httplib.h.

◆ Put() [14/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const MultipartFormDataItems items 
)
inline

Definition at line 8556 of file httplib.h.

Here is the call graph for this function:

◆ Put() [15/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const Params params 
)
inline

Definition at line 8539 of file httplib.h.

Here is the call graph for this function:

◆ Put() [16/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const std::string &  body,
const std::string &  content_type 
)
inline

Definition at line 8481 of file httplib.h.

Here is the call graph for this function:

◆ Put() [17/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
const std::string &  body,
const std::string &  content_type,
Progress  progress 
)
inline

Definition at line 8486 of file httplib.h.

Here is the call graph for this function:

◆ Put() [18/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
ContentProviderWithoutLength  content_provider,
const std::string &  content_type 
)
inline

Definition at line 8516 of file httplib.h.

Here is the call graph for this function:

◆ Put() [19/19]

Result httplib::ClientImpl::Put ( const std::string &  path,
size_t  content_length,
ContentProvider  content_provider,
const std::string &  content_type 
)
inline

Definition at line 8509 of file httplib.h.

Here is the call graph for this function:

◆ send() [1/2]

Result httplib::ClientImpl::send ( const Request req)
inline

Definition at line 7630 of file httplib.h.

◆ send() [2/2]

bool httplib::ClientImpl::send ( Request req,
Response res,
Error error 
)
inline

Definition at line 7514 of file httplib.h.

◆ set_address_family()

void httplib::ClientImpl::set_address_family ( int  family)
inline

Definition at line 8862 of file httplib.h.

◆ set_basic_auth()

void httplib::ClientImpl::set_basic_auth ( const std::string &  username,
const std::string &  password 
)
inline

Definition at line 8824 of file httplib.h.

◆ set_bearer_token_auth()

void httplib::ClientImpl::set_bearer_token_auth ( const std::string &  token)
inline

Definition at line 8830 of file httplib.h.

◆ set_compress()

void httplib::ClientImpl::set_compress ( bool  on)
inline

Definition at line 8874 of file httplib.h.

◆ set_connection_timeout() [1/2]

template<class Rep , class Period >
void httplib::ClientImpl::set_connection_timeout ( const std::chrono::duration< Rep, Period > &  duration)
inline

Definition at line 2212 of file httplib.h.

Here is the call graph for this function:

◆ set_connection_timeout() [2/2]

void httplib::ClientImpl::set_connection_timeout ( time_t  sec,
time_t  usec = 0 
)
inline

Definition at line 8809 of file httplib.h.

Here is the caller graph for this function:

◆ set_decompress()

void httplib::ClientImpl::set_decompress ( bool  on)
inline

Definition at line 8876 of file httplib.h.

◆ set_default_headers()

void httplib::ClientImpl::set_default_headers ( Headers  headers)
inline

Definition at line 8853 of file httplib.h.

◆ set_follow_location()

void httplib::ClientImpl::set_follow_location ( bool  on)
inline

Definition at line 8844 of file httplib.h.

◆ set_header_writer()

void httplib::ClientImpl::set_header_writer ( std::function< ssize_t(Stream &, Headers &)> const &  writer)
inline

Definition at line 8857 of file httplib.h.

◆ set_hostname_addr_map()

void httplib::ClientImpl::set_hostname_addr_map ( std::map< std::string, std::string >  addr_map)
inline

Definition at line 8849 of file httplib.h.

◆ set_interface()

void httplib::ClientImpl::set_interface ( const std::string &  intf)
inline

Definition at line 8878 of file httplib.h.

◆ set_ipv6_v6only()

void httplib::ClientImpl::set_ipv6_v6only ( bool  on)
inline

Definition at line 8868 of file httplib.h.

◆ set_keep_alive()

void httplib::ClientImpl::set_keep_alive ( bool  on)
inline

Definition at line 8842 of file httplib.h.

◆ set_logger()

void httplib::ClientImpl::set_logger ( Logger  logger)
inline

Definition at line 8954 of file httplib.h.

◆ set_proxy()

void httplib::ClientImpl::set_proxy ( const std::string &  host,
int  port 
)
inline

Definition at line 8882 of file httplib.h.

Here is the call graph for this function:

◆ set_proxy_basic_auth()

void httplib::ClientImpl::set_proxy_basic_auth ( const std::string &  username,
const std::string &  password 
)
inline

Definition at line 8887 of file httplib.h.

◆ set_proxy_bearer_token_auth()

void httplib::ClientImpl::set_proxy_bearer_token_auth ( const std::string &  token)
inline

Definition at line 8893 of file httplib.h.

◆ set_read_timeout() [1/2]

template<class Rep , class Period >
void httplib::ClientImpl::set_read_timeout ( const std::chrono::duration< Rep, Period > &  duration)
inline

Definition at line 2220 of file httplib.h.

Here is the call graph for this function:

◆ set_read_timeout() [2/2]

void httplib::ClientImpl::set_read_timeout ( time_t  sec,
time_t  usec = 0 
)
inline

Definition at line 8814 of file httplib.h.

Here is the caller graph for this function:

◆ set_socket_options()

void httplib::ClientImpl::set_socket_options ( SocketOptions  socket_options)
inline

Definition at line 8870 of file httplib.h.

◆ set_tcp_nodelay()

void httplib::ClientImpl::set_tcp_nodelay ( bool  on)
inline

Definition at line 8866 of file httplib.h.

◆ set_url_encode()

void httplib::ClientImpl::set_url_encode ( bool  on)
inline

Definition at line 8846 of file httplib.h.

◆ set_write_timeout() [1/2]

template<class Rep , class Period >
void httplib::ClientImpl::set_write_timeout ( const std::chrono::duration< Rep, Period > &  duration)
inline

Definition at line 2227 of file httplib.h.

Here is the call graph for this function:

◆ set_write_timeout() [2/2]

void httplib::ClientImpl::set_write_timeout ( time_t  sec,
time_t  usec = 0 
)
inline

Definition at line 8819 of file httplib.h.

Here is the caller graph for this function:

◆ shutdown_socket()

void httplib::ClientImpl::shutdown_socket ( Socket socket) const
inlineprotected

Definition at line 7454 of file httplib.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shutdown_ssl()

void httplib::ClientImpl::shutdown_ssl ( Socket socket,
bool  shutdown_gracefully 
)
inlineprotectedvirtual

Definition at line 7446 of file httplib.h.

Here is the caller graph for this function:

◆ socket()

socket_t httplib::ClientImpl::socket ( ) const
inline

Definition at line 8807 of file httplib.h.

Here is the caller graph for this function:

◆ stop()

void httplib::ClientImpl::stop ( )
inline

Definition at line 8775 of file httplib.h.

Here is the call graph for this function:

◆ write_content_with_provider()

bool httplib::ClientImpl::write_content_with_provider ( Stream strm,
const Request req,
Error error 
) const
inlineprotected

Definition at line 7776 of file httplib.h.

Here is the call graph for this function:

Member Data Documentation

◆ addr_map_

std::map<std::string, std::string> httplib::ClientImpl::addr_map_
protected

Definition at line 1519 of file httplib.h.

◆ address_family_

int httplib::ClientImpl::address_family_ = AF_UNSPEC
protected

Definition at line 1552 of file httplib.h.

◆ basic_auth_password_

std::string httplib::ClientImpl::basic_auth_password_
protected

Definition at line 1540 of file httplib.h.

◆ basic_auth_username_

std::string httplib::ClientImpl::basic_auth_username_
protected

Definition at line 1539 of file httplib.h.

◆ bearer_token_auth_token_

std::string httplib::ClientImpl::bearer_token_auth_token_
protected

Definition at line 1541 of file httplib.h.

◆ client_cert_path_

std::string httplib::ClientImpl::client_cert_path_
protected

Definition at line 1529 of file httplib.h.

◆ client_key_path_

std::string httplib::ClientImpl::client_key_path_
protected

Definition at line 1530 of file httplib.h.

◆ compress_

bool httplib::ClientImpl::compress_ = false
protected

Definition at line 1557 of file httplib.h.

◆ connection_timeout_sec_

time_t httplib::ClientImpl::connection_timeout_sec_ = CPPHTTPLIB_CONNECTION_TIMEOUT_SECOND
protected

Definition at line 1532 of file httplib.h.

◆ connection_timeout_usec_

time_t httplib::ClientImpl::connection_timeout_usec_ = CPPHTTPLIB_CONNECTION_TIMEOUT_USECOND
protected

Definition at line 1533 of file httplib.h.

◆ decompress_

bool httplib::ClientImpl::decompress_ = true
protected

Definition at line 1558 of file httplib.h.

◆ default_headers_

Headers httplib::ClientImpl::default_headers_
protected

Definition at line 1522 of file httplib.h.

◆ follow_location_

bool httplib::ClientImpl::follow_location_ = false
protected

Definition at line 1548 of file httplib.h.

◆ header_writer_

std::function<ssize_t(Stream &, Headers &)> httplib::ClientImpl::header_writer_
protected
Initial value:
=
ssize_t write_headers(Stream &strm, const Headers &headers)
Definition: httplib.h:4427

Definition at line 1525 of file httplib.h.

◆ host_

const std::string httplib::ClientImpl::host_
protected

Definition at line 1504 of file httplib.h.

◆ host_and_port_

const std::string httplib::ClientImpl::host_and_port_
protected

Definition at line 1506 of file httplib.h.

◆ interface_

std::string httplib::ClientImpl::interface_
protected

Definition at line 1560 of file httplib.h.

◆ ipv6_v6only_

bool httplib::ClientImpl::ipv6_v6only_ = CPPHTTPLIB_IPV6_V6ONLY
protected

Definition at line 1554 of file httplib.h.

◆ keep_alive_

bool httplib::ClientImpl::keep_alive_ = false
protected

Definition at line 1547 of file httplib.h.

◆ logger_

Logger httplib::ClientImpl::logger_
protected

Definition at line 1586 of file httplib.h.

◆ port_

const int httplib::ClientImpl::port_
protected

Definition at line 1505 of file httplib.h.

◆ proxy_basic_auth_password_

std::string httplib::ClientImpl::proxy_basic_auth_password_
protected

Definition at line 1566 of file httplib.h.

◆ proxy_basic_auth_username_

std::string httplib::ClientImpl::proxy_basic_auth_username_
protected

Definition at line 1565 of file httplib.h.

◆ proxy_bearer_token_auth_token_

std::string httplib::ClientImpl::proxy_bearer_token_auth_token_
protected

Definition at line 1567 of file httplib.h.

◆ proxy_host_

std::string httplib::ClientImpl::proxy_host_
protected

Definition at line 1562 of file httplib.h.

◆ proxy_port_

int httplib::ClientImpl::proxy_port_ = -1
protected

Definition at line 1563 of file httplib.h.

◆ read_timeout_sec_

time_t httplib::ClientImpl::read_timeout_sec_ = CPPHTTPLIB_CLIENT_READ_TIMEOUT_SECOND
protected

Definition at line 1534 of file httplib.h.

◆ read_timeout_usec_

time_t httplib::ClientImpl::read_timeout_usec_ = CPPHTTPLIB_CLIENT_READ_TIMEOUT_USECOND
protected

Definition at line 1535 of file httplib.h.

◆ request_mutex_

std::recursive_mutex httplib::ClientImpl::request_mutex_
protected

Definition at line 1511 of file httplib.h.

◆ socket_

Socket httplib::ClientImpl::socket_
protected

Definition at line 1509 of file httplib.h.

◆ socket_mutex_

std::mutex httplib::ClientImpl::socket_mutex_
mutableprotected

Definition at line 1510 of file httplib.h.

◆ socket_options_

SocketOptions httplib::ClientImpl::socket_options_ = nullptr
protected

Definition at line 1555 of file httplib.h.

◆ socket_requests_are_from_thread_

std::thread::id httplib::ClientImpl::socket_requests_are_from_thread_ = std::thread::id()
protected

Definition at line 1515 of file httplib.h.

◆ socket_requests_in_flight_

size_t httplib::ClientImpl::socket_requests_in_flight_ = 0
protected

Definition at line 1514 of file httplib.h.

◆ socket_should_be_closed_when_request_is_done_

bool httplib::ClientImpl::socket_should_be_closed_when_request_is_done_ = false
protected

Definition at line 1516 of file httplib.h.

◆ tcp_nodelay_

bool httplib::ClientImpl::tcp_nodelay_ = CPPHTTPLIB_TCP_NODELAY
protected

Definition at line 1553 of file httplib.h.

◆ url_encode_

bool httplib::ClientImpl::url_encode_ = true
protected

Definition at line 1550 of file httplib.h.

◆ write_timeout_sec_

time_t httplib::ClientImpl::write_timeout_sec_ = CPPHTTPLIB_CLIENT_WRITE_TIMEOUT_SECOND
protected

Definition at line 1536 of file httplib.h.

◆ write_timeout_usec_

time_t httplib::ClientImpl::write_timeout_usec_ = CPPHTTPLIB_CLIENT_WRITE_TIMEOUT_USECOND
protected

Definition at line 1537 of file httplib.h.


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