ClientImpl Class Reference

#include <RobotAPI/libraries/armem/server/ltm/detail/mixins/util/httplib.h>

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

Protected Member Functions

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

Protected Attributes

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

Detailed Description

Definition at line 1193 of file httplib.h.

Constructor & Destructor Documentation

◆ ClientImpl() [1/3]

ClientImpl ( const std::string &  host)
inlineexplicit

Definition at line 7244 of file httplib.h.

◆ ClientImpl() [2/3]

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

Definition at line 7247 of file httplib.h.

◆ ClientImpl() [3/3]

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

Definition at line 7250 of file httplib.h.

◆ ~ClientImpl()

~ClientImpl ( )
inlinevirtual

Definition at line 7257 of file httplib.h.

+ Here is the call graph for this function:

Member Function Documentation

◆ close_socket()

void close_socket ( Socket socket)
inlineprotected

Definition at line 7354 of file httplib.h.

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

◆ copy_settings()

void copy_settings ( const ClientImpl rhs)
inlineprotected

Definition at line 7265 of file httplib.h.

◆ create_and_connect_socket()

bool create_and_connect_socket ( Socket socket,
Error error 
)
inlineprotectedvirtual

Definition at line 7333 of file httplib.h.

+ Here is the call graph for this function:

◆ Delete() [1/10]

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

Definition at line 8593 of file httplib.h.

+ Here is the caller graph for this function:

◆ Delete() [2/10]

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

Definition at line 8602 of file httplib.h.

+ Here is the call graph for this function:

◆ Delete() [3/10]

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

Definition at line 8608 of file httplib.h.

+ Here is the call graph for this function:

◆ Delete() [4/10]

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

Definition at line 8597 of file httplib.h.

+ Here is the call graph for this function:

◆ Delete() [5/10]

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

Definition at line 8615 of file httplib.h.

+ Here is the call graph for this function:

◆ Delete() [6/10]

Result 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 8622 of file httplib.h.

+ Here is the call graph for this function:

◆ Delete() [7/10]

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

Definition at line 8653 of file httplib.h.

+ Here is the call graph for this function:

◆ Delete() [8/10]

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

Definition at line 8660 of file httplib.h.

+ Here is the call graph for this function:

◆ Delete() [9/10]

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

Definition at line 8639 of file httplib.h.

+ Here is the call graph for this function:

◆ Delete() [10/10]

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

Definition at line 8645 of file httplib.h.

+ Here is the call graph for this function:

◆ Get() [1/15]

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

Definition at line 8086 of file httplib.h.

+ Here is the caller graph for this function:

◆ Get() [2/15]

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

Definition at line 8094 of file httplib.h.

+ Here is the call graph for this function:

◆ Get() [3/15]

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

Definition at line 8121 of file httplib.h.

+ Here is the call graph for this function:

◆ Get() [4/15]

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

Definition at line 8126 of file httplib.h.

+ Here is the call graph for this function:

◆ Get() [5/15]

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

Definition at line 8098 of file httplib.h.

◆ Get() [6/15]

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

Definition at line 8140 of file httplib.h.

+ Here is the call graph for this function:

◆ Get() [7/15]

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

Definition at line 8155 of file httplib.h.

◆ Get() [8/15]

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

Definition at line 8182 of file httplib.h.

+ Here is the call graph for this function:

◆ Get() [9/15]

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

Definition at line 8174 of file httplib.h.

+ Here is the call graph for this function:

◆ Get() [10/15]

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

Definition at line 8190 of file httplib.h.

+ Here is the call graph for this function:

◆ Get() [11/15]

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

Definition at line 8109 of file httplib.h.

+ Here is the call graph for this function:

◆ Get() [12/15]

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

Definition at line 8114 of file httplib.h.

+ Here is the call graph for this function:

◆ Get() [13/15]

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

Definition at line 8090 of file httplib.h.

+ Here is the call graph for this function:

◆ Get() [14/15]

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

Definition at line 8133 of file httplib.h.

+ Here is the call graph for this function:

◆ Get() [15/15]

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

Definition at line 8147 of file httplib.h.

+ Here is the call graph for this function:

◆ Head() [1/2]

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

Definition at line 8205 of file httplib.h.

◆ Head() [2/2]

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

Definition at line 8209 of file httplib.h.

◆ host()

std::string host ( ) const
inline

Definition at line 8706 of file httplib.h.

+ Here is the caller graph for this function:

◆ is_socket_open()

size_t is_socket_open ( ) const
inline

Definition at line 8710 of file httplib.h.

+ Here is the call graph for this function:

◆ is_valid()

bool is_valid ( ) const
inlinevirtual

Definition at line 7263 of file httplib.h.

◆ Options() [1/2]

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

Definition at line 8669 of file httplib.h.

◆ Options() [2/2]

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

Definition at line 8673 of file httplib.h.

◆ Patch() [1/13]

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

Definition at line 8503 of file httplib.h.

+ Here is the caller graph for this function:

◆ Patch() [2/13]

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

Definition at line 8507 of file httplib.h.

+ Here is the call graph for this function:

◆ Patch() [3/13]

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

Definition at line 8513 of file httplib.h.

+ Here is the call graph for this function:

◆ Patch() [4/13]

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

Definition at line 8520 of file httplib.h.

+ Here is the call graph for this function:

◆ Patch() [5/13]

Result 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 8526 of file httplib.h.

◆ Patch() [6/13]

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

Definition at line 8548 of file httplib.h.

+ Here is the call graph for this function:

◆ Patch() [7/13]

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

Definition at line 8554 of file httplib.h.

◆ Patch() [8/13]

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

Definition at line 8585 of file httplib.h.

◆ Patch() [9/13]

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

Definition at line 8576 of file httplib.h.

◆ Patch() [10/13]

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

Definition at line 8535 of file httplib.h.

+ Here is the call graph for this function:

◆ Patch() [11/13]

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

Definition at line 8541 of file httplib.h.

+ Here is the call graph for this function:

◆ Patch() [12/13]

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

Definition at line 8570 of file httplib.h.

+ Here is the call graph for this function:

◆ Patch() [13/13]

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

Definition at line 8563 of file httplib.h.

+ Here is the call graph for this function:

◆ port()

int port ( ) const
inline

Definition at line 8708 of file httplib.h.

+ Here is the caller graph for this function:

◆ Post() [1/20]

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

Definition at line 8219 of file httplib.h.

+ Here is the caller graph for this function:

◆ Post() [2/20]

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

Definition at line 8228 of file httplib.h.

+ Here is the call graph for this function:

◆ Post() [3/20]

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

Definition at line 8223 of file httplib.h.

+ Here is the call graph for this function:

◆ Post() [4/20]

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

Definition at line 8234 of file httplib.h.

◆ Post() [5/20]

Result 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 8241 of file httplib.h.

◆ Post() [6/20]

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

Definition at line 8329 of file httplib.h.

+ Here is the call graph for this function:

◆ Post() [7/20]

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

Definition at line 8352 of file httplib.h.

+ Here is the call graph for this function:

◆ Post() [8/20]

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

Definition at line 8338 of file httplib.h.

+ Here is the call graph for this function:

◆ Post() [9/20]

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

Definition at line 8311 of file httplib.h.

+ Here is the call graph for this function:

◆ Post() [10/20]

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

Definition at line 8317 of file httplib.h.

+ Here is the call graph for this function:

◆ Post() [11/20]

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

Definition at line 8260 of file httplib.h.

◆ Post() [12/20]

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

Definition at line 8268 of file httplib.h.

◆ Post() [13/20]

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

Definition at line 8303 of file httplib.h.

◆ Post() [14/20]

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

Definition at line 8294 of file httplib.h.

◆ Post() [15/20]

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

Definition at line 8324 of file httplib.h.

+ Here is the call graph for this function:

◆ Post() [16/20]

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

Definition at line 8277 of file httplib.h.

+ Here is the call graph for this function:

◆ Post() [17/20]

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

Definition at line 8249 of file httplib.h.

+ Here is the call graph for this function:

◆ Post() [18/20]

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

Definition at line 8254 of file httplib.h.

+ Here is the call graph for this function:

◆ Post() [19/20]

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

Definition at line 8288 of file httplib.h.

+ Here is the call graph for this function:

◆ Post() [20/20]

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

Definition at line 8281 of file httplib.h.

+ Here is the call graph for this function:

◆ process_request()

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

Definition at line 7941 of file httplib.h.

+ Here is the call graph for this function:

◆ Put() [1/19]

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

Definition at line 8364 of file httplib.h.

+ Here is the caller graph for this function:

◆ Put() [2/19]

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

Definition at line 8368 of file httplib.h.

+ Here is the call graph for this function:

◆ Put() [3/19]

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

Definition at line 8374 of file httplib.h.

◆ Put() [4/19]

Result 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 8381 of file httplib.h.

◆ Put() [5/19]

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

Definition at line 8469 of file httplib.h.

+ Here is the call graph for this function:

◆ Put() [6/19]

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

Definition at line 8492 of file httplib.h.

+ Here is the call graph for this function:

◆ Put() [7/19]

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

Definition at line 8478 of file httplib.h.

+ Here is the call graph for this function:

◆ Put() [8/19]

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

Definition at line 8451 of file httplib.h.

+ Here is the call graph for this function:

◆ Put() [9/19]

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

Definition at line 8457 of file httplib.h.

+ Here is the call graph for this function:

◆ Put() [10/19]

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

Definition at line 8400 of file httplib.h.

◆ Put() [11/19]

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

Definition at line 8408 of file httplib.h.

◆ Put() [12/19]

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

Definition at line 8439 of file httplib.h.

◆ Put() [13/19]

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

Definition at line 8430 of file httplib.h.

◆ Put() [14/19]

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

Definition at line 8464 of file httplib.h.

+ Here is the call graph for this function:

◆ Put() [15/19]

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

Definition at line 8447 of file httplib.h.

+ Here is the call graph for this function:

◆ Put() [16/19]

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

Definition at line 8389 of file httplib.h.

+ Here is the call graph for this function:

◆ Put() [17/19]

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

Definition at line 8394 of file httplib.h.

+ Here is the call graph for this function:

◆ Put() [18/19]

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

Definition at line 8424 of file httplib.h.

+ Here is the call graph for this function:

◆ Put() [19/19]

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

Definition at line 8417 of file httplib.h.

+ Here is the call graph for this function:

◆ send() [1/2]

Result send ( const Request req)
inline

Definition at line 7527 of file httplib.h.

◆ send() [2/2]

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

Definition at line 7409 of file httplib.h.

◆ set_address_family()

void set_address_family ( int  family)
inline

Definition at line 8770 of file httplib.h.

◆ set_basic_auth()

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

Definition at line 8732 of file httplib.h.

◆ set_bearer_token_auth()

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

Definition at line 8738 of file httplib.h.

◆ set_compress()

void set_compress ( bool  on)
inline

Definition at line 8782 of file httplib.h.

◆ set_connection_timeout() [1/2]

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

Definition at line 2205 of file httplib.h.

+ Here is the call graph for this function:

◆ set_connection_timeout() [2/2]

void set_connection_timeout ( time_t  sec,
time_t  usec = 0 
)
inline

Definition at line 8717 of file httplib.h.

+ Here is the caller graph for this function:

◆ set_decompress()

void set_decompress ( bool  on)
inline

Definition at line 8784 of file httplib.h.

◆ set_default_headers()

void set_default_headers ( Headers  headers)
inline

Definition at line 8761 of file httplib.h.

◆ set_follow_location()

void set_follow_location ( bool  on)
inline

Definition at line 8752 of file httplib.h.

◆ set_header_writer()

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

Definition at line 8765 of file httplib.h.

◆ set_hostname_addr_map()

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

Definition at line 8757 of file httplib.h.

◆ set_interface()

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

Definition at line 8786 of file httplib.h.

◆ set_ipv6_v6only()

void set_ipv6_v6only ( bool  on)
inline

Definition at line 8776 of file httplib.h.

◆ set_keep_alive()

void set_keep_alive ( bool  on)
inline

Definition at line 8750 of file httplib.h.

◆ set_logger()

void set_logger ( Logger  logger)
inline

Definition at line 8862 of file httplib.h.

◆ set_proxy()

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

Definition at line 8790 of file httplib.h.

+ Here is the call graph for this function:

◆ set_proxy_basic_auth()

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

Definition at line 8795 of file httplib.h.

◆ set_proxy_bearer_token_auth()

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

Definition at line 8801 of file httplib.h.

◆ set_read_timeout() [1/2]

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

Definition at line 2213 of file httplib.h.

+ Here is the call graph for this function:

◆ set_read_timeout() [2/2]

void set_read_timeout ( time_t  sec,
time_t  usec = 0 
)
inline

Definition at line 8722 of file httplib.h.

+ Here is the caller graph for this function:

◆ set_socket_options()

void set_socket_options ( SocketOptions  socket_options)
inline

Definition at line 8778 of file httplib.h.

◆ set_tcp_nodelay()

void set_tcp_nodelay ( bool  on)
inline

Definition at line 8774 of file httplib.h.

◆ set_url_encode()

void set_url_encode ( bool  on)
inline

Definition at line 8754 of file httplib.h.

◆ set_write_timeout() [1/2]

void set_write_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_write_timeout() [2/2]

void set_write_timeout ( time_t  sec,
time_t  usec = 0 
)
inline

Definition at line 8727 of file httplib.h.

+ Here is the caller graph for this function:

◆ shutdown_socket()

void shutdown_socket ( Socket socket) const
inlineprotected

Definition at line 7349 of file httplib.h.

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

◆ shutdown_ssl()

void shutdown_ssl ( Socket socket,
bool  shutdown_gracefully 
)
inlineprotectedvirtual

Definition at line 7341 of file httplib.h.

+ Here is the caller graph for this function:

◆ socket()

socket_t socket ( ) const
inline

Definition at line 8715 of file httplib.h.

+ Here is the caller graph for this function:

◆ stop()

void stop ( )
inline

Definition at line 8683 of file httplib.h.

+ Here is the call graph for this function:

◆ write_content_with_provider()

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

Definition at line 7673 of file httplib.h.

+ Here is the call graph for this function:

Member Data Documentation

◆ addr_map_

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

Definition at line 1512 of file httplib.h.

◆ address_family_

int address_family_ = AF_UNSPEC
protected

Definition at line 1545 of file httplib.h.

◆ basic_auth_password_

std::string basic_auth_password_
protected

Definition at line 1533 of file httplib.h.

◆ basic_auth_username_

std::string basic_auth_username_
protected

Definition at line 1532 of file httplib.h.

◆ bearer_token_auth_token_

std::string bearer_token_auth_token_
protected

Definition at line 1534 of file httplib.h.

◆ client_cert_path_

std::string client_cert_path_
protected

Definition at line 1522 of file httplib.h.

◆ client_key_path_

std::string client_key_path_
protected

Definition at line 1523 of file httplib.h.

◆ compress_

bool compress_ = false
protected

Definition at line 1550 of file httplib.h.

◆ connection_timeout_sec_

time_t connection_timeout_sec_ = CPPHTTPLIB_CONNECTION_TIMEOUT_SECOND
protected

Definition at line 1525 of file httplib.h.

◆ connection_timeout_usec_

time_t connection_timeout_usec_ = CPPHTTPLIB_CONNECTION_TIMEOUT_USECOND
protected

Definition at line 1526 of file httplib.h.

◆ decompress_

bool decompress_ = true
protected

Definition at line 1551 of file httplib.h.

◆ default_headers_

Headers default_headers_
protected

Definition at line 1515 of file httplib.h.

◆ follow_location_

bool follow_location_ = false
protected

Definition at line 1541 of file httplib.h.

◆ header_writer_

std::function<ssize_t(Stream &, Headers &)> header_writer_
protected
Initial value:

Definition at line 1518 of file httplib.h.

◆ host_

const std::string host_
protected

Definition at line 1497 of file httplib.h.

◆ host_and_port_

const std::string host_and_port_
protected

Definition at line 1499 of file httplib.h.

◆ interface_

std::string interface_
protected

Definition at line 1553 of file httplib.h.

◆ ipv6_v6only_

bool ipv6_v6only_ = CPPHTTPLIB_IPV6_V6ONLY
protected

Definition at line 1547 of file httplib.h.

◆ keep_alive_

bool keep_alive_ = false
protected

Definition at line 1540 of file httplib.h.

◆ logger_

Logger logger_
protected

Definition at line 1579 of file httplib.h.

◆ port_

const int port_
protected

Definition at line 1498 of file httplib.h.

◆ proxy_basic_auth_password_

std::string proxy_basic_auth_password_
protected

Definition at line 1559 of file httplib.h.

◆ proxy_basic_auth_username_

std::string proxy_basic_auth_username_
protected

Definition at line 1558 of file httplib.h.

◆ proxy_bearer_token_auth_token_

std::string proxy_bearer_token_auth_token_
protected

Definition at line 1560 of file httplib.h.

◆ proxy_host_

std::string proxy_host_
protected

Definition at line 1555 of file httplib.h.

◆ proxy_port_

int proxy_port_ = -1
protected

Definition at line 1556 of file httplib.h.

◆ read_timeout_sec_

time_t read_timeout_sec_ = CPPHTTPLIB_CLIENT_READ_TIMEOUT_SECOND
protected

Definition at line 1527 of file httplib.h.

◆ read_timeout_usec_

time_t read_timeout_usec_ = CPPHTTPLIB_CLIENT_READ_TIMEOUT_USECOND
protected

Definition at line 1528 of file httplib.h.

◆ request_mutex_

std::recursive_mutex request_mutex_
protected

Definition at line 1504 of file httplib.h.

◆ socket_

Socket socket_
protected

Definition at line 1502 of file httplib.h.

◆ socket_mutex_

std::mutex socket_mutex_
mutableprotected

Definition at line 1503 of file httplib.h.

◆ socket_options_

SocketOptions socket_options_ = nullptr
protected

Definition at line 1548 of file httplib.h.

◆ socket_requests_are_from_thread_

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

Definition at line 1508 of file httplib.h.

◆ socket_requests_in_flight_

size_t socket_requests_in_flight_ = 0
protected

Definition at line 1507 of file httplib.h.

◆ socket_should_be_closed_when_request_is_done_

bool socket_should_be_closed_when_request_is_done_ = false
protected

Definition at line 1509 of file httplib.h.

◆ tcp_nodelay_

bool tcp_nodelay_ = CPPHTTPLIB_TCP_NODELAY
protected

Definition at line 1546 of file httplib.h.

◆ url_encode_

bool url_encode_ = true
protected

Definition at line 1543 of file httplib.h.

◆ write_timeout_sec_

time_t write_timeout_sec_ = CPPHTTPLIB_CLIENT_WRITE_TIMEOUT_SECOND
protected

Definition at line 1529 of file httplib.h.

◆ write_timeout_usec_

time_t write_timeout_usec_ = CPPHTTPLIB_CLIENT_WRITE_TIMEOUT_USECOND
protected

Definition at line 1530 of file httplib.h.


The documentation for this class was generated from the following file:
httplib::detail::write_headers
ssize_t write_headers(Stream &strm, const Headers &headers)
Definition: httplib.h:4425