Goby3  3.1.4
2024.02.22
httplib::ClientImpl Class Reference

#include <goby/util/thirdparty/cpp-httplib/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)
 
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 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)
 
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 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 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)
 
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 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 Headers &headers, const char *body, size_t content_length, 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 Headers &headers, const std::string &body, const std::string &content_type)
 
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 Headers &headers, const char *body, size_t content_length, const std::string &content_type)
 
Result Delete (const std::string &path, 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)
 
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_address_family (int family)
 
void set_tcp_nodelay (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)
 
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)
 
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::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_READ_TIMEOUT_SECOND
 
time_t read_timeout_usec_ = CPPHTTPLIB_READ_TIMEOUT_USECOND
 
time_t write_timeout_sec_ = CPPHTTPLIB_WRITE_TIMEOUT_SECOND
 
time_t write_timeout_usec_ = CPPHTTPLIB_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
 
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 1015 of file httplib.h.

Constructor & Destructor Documentation

◆ ClientImpl() [1/3]

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

Definition at line 7537 of file httplib.h.

◆ ClientImpl() [2/3]

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

Definition at line 7542 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 7547 of file httplib.h.

◆ ~ClientImpl()

httplib::ClientImpl::~ClientImpl ( )
inlinevirtual

Definition at line 7558 of file httplib.h.

Member Function Documentation

◆ close_socket()

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

Definition at line 7662 of file httplib.h.

◆ copy_settings()

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

Definition at line 7567 of file httplib.h.

◆ create_and_connect_socket()

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

Definition at line 7634 of file httplib.h.

◆ Delete() [1/6]

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

Definition at line 8943 of file httplib.h.

◆ Delete() [2/6]

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

Definition at line 8953 of file httplib.h.

◆ Delete() [3/6]

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

Definition at line 8948 of file httplib.h.

◆ Delete() [4/6]

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

◆ Delete() [5/6]

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

Definition at line 8982 of file httplib.h.

◆ Delete() [6/6]

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

Definition at line 8976 of file httplib.h.

◆ Get() [1/15]

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

Definition at line 8535 of file httplib.h.

◆ Get() [2/15]

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

Definition at line 8542 of file httplib.h.

◆ Get() [3/15]

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

Definition at line 8569 of file httplib.h.

◆ Get() [4/15]

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

Definition at line 8575 of file httplib.h.

◆ Get() [5/15]

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

Definition at line 8547 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 8587 of file httplib.h.

◆ 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 8600 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 8629 of file httplib.h.

◆ Get() [9/15]

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

Definition at line 8617 of file httplib.h.

◆ 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 8635 of file httplib.h.

◆ Get() [11/15]

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

Definition at line 8558 of file httplib.h.

◆ Get() [12/15]

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

Definition at line 8563 of file httplib.h.

◆ Get() [13/15]

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

Definition at line 8537 of file httplib.h.

◆ Get() [14/15]

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

Definition at line 8581 of file httplib.h.

◆ Get() [15/15]

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

Definition at line 8593 of file httplib.h.

◆ Head() [1/2]

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

Definition at line 8648 of file httplib.h.

◆ Head() [2/2]

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

Definition at line 8650 of file httplib.h.

◆ host()

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

Definition at line 9025 of file httplib.h.

◆ is_socket_open()

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

Definition at line 9029 of file httplib.h.

◆ is_valid()

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

Definition at line 7565 of file httplib.h.

◆ Options() [1/2]

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

Definition at line 8988 of file httplib.h.

◆ Options() [2/2]

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

Definition at line 8990 of file httplib.h.

◆ Patch() [1/9]

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

Definition at line 8883 of file httplib.h.

◆ Patch() [2/9]

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

Definition at line 8888 of file httplib.h.

◆ Patch() [3/9]

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

◆ Patch() [4/9]

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

Definition at line 8907 of file httplib.h.

◆ Patch() [5/9]

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

Definition at line 8935 of file httplib.h.

◆ Patch() [6/9]

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

◆ Patch() [7/9]

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

Definition at line 8901 of file httplib.h.

◆ Patch() [8/9]

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

Definition at line 8920 of file httplib.h.

◆ Patch() [9/9]

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

Definition at line 8914 of file httplib.h.

◆ port()

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

Definition at line 9027 of file httplib.h.

◆ Post() [1/16]

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

Definition at line 8660 of file httplib.h.

◆ Post() [2/16]

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

Definition at line 8670 of file httplib.h.

◆ Post() [3/16]

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

Definition at line 8665 of file httplib.h.

◆ Post() [4/16]

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

◆ Post() [5/16]

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

Definition at line 8742 of file httplib.h.

◆ Post() [6/16]

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

Definition at line 8764 of file httplib.h.

◆ Post() [7/16]

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

Definition at line 8751 of file httplib.h.

◆ Post() [8/16]

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

Definition at line 8730 of file httplib.h.

◆ Post() [9/16]

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

Definition at line 8689 of file httplib.h.

◆ Post() [10/16]

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

Definition at line 8722 of file httplib.h.

◆ Post() [11/16]

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

◆ Post() [12/16]

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

Definition at line 8737 of file httplib.h.

◆ Post() [13/16]

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

Definition at line 8696 of file httplib.h.

◆ Post() [14/16]

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

Definition at line 8683 of file httplib.h.

◆ Post() [15/16]

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

Definition at line 8707 of file httplib.h.

◆ Post() [16/16]

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

Definition at line 8701 of file httplib.h.

◆ process_request()

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

Definition at line 8366 of file httplib.h.

◆ Put() [1/15]

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

Definition at line 8775 of file httplib.h.

◆ Put() [2/15]

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

Definition at line 8780 of file httplib.h.

◆ Put() [3/15]

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

◆ Put() [4/15]

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

Definition at line 8851 of file httplib.h.

◆ Put() [5/15]

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

Definition at line 8873 of file httplib.h.

◆ Put() [6/15]

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

Definition at line 8860 of file httplib.h.

◆ Put() [7/15]

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

Definition at line 8840 of file httplib.h.

◆ Put() [8/15]

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

Definition at line 8799 of file httplib.h.

◆ Put() [9/15]

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

Definition at line 8827 of file httplib.h.

◆ Put() [10/15]

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

◆ Put() [11/15]

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

Definition at line 8846 of file httplib.h.

◆ Put() [12/15]

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

Definition at line 8835 of file httplib.h.

◆ Put() [13/15]

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

Definition at line 8793 of file httplib.h.

◆ Put() [14/15]

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

Definition at line 8812 of file httplib.h.

◆ Put() [15/15]

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

Definition at line 8806 of file httplib.h.

◆ send() [1/2]

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

Definition at line 7858 of file httplib.h.

◆ send() [2/2]

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

Definition at line 7735 of file httplib.h.

◆ set_address_family()

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

Definition at line 9090 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 9055 of file httplib.h.

◆ set_bearer_token_auth()

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

Definition at line 9061 of file httplib.h.

◆ set_compress()

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

Definition at line 9099 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 1871 of file httplib.h.

◆ set_connection_timeout() [2/2]

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

Definition at line 9037 of file httplib.h.

◆ set_decompress()

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

Definition at line 9101 of file httplib.h.

◆ set_default_headers()

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

Definition at line 9085 of file httplib.h.

◆ set_follow_location()

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

Definition at line 9076 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 9080 of file httplib.h.

◆ set_interface()

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

Definition at line 9103 of file httplib.h.

◆ set_keep_alive()

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

Definition at line 9074 of file httplib.h.

◆ set_logger()

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

Definition at line 9192 of file httplib.h.

◆ set_proxy()

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

Definition at line 9105 of file httplib.h.

◆ set_proxy_basic_auth()

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

Definition at line 9111 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 9118 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 1878 of file httplib.h.

◆ set_read_timeout() [2/2]

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

Definition at line 9043 of file httplib.h.

◆ set_socket_options()

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

Definition at line 9094 of file httplib.h.

◆ set_tcp_nodelay()

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

Definition at line 9092 of file httplib.h.

◆ set_url_encode()

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

Definition at line 9078 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 1885 of file httplib.h.

◆ set_write_timeout() [2/2]

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

Definition at line 9049 of file httplib.h.

◆ shutdown_socket()

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

Definition at line 7653 of file httplib.h.

◆ shutdown_ssl()

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

Definition at line 7645 of file httplib.h.

◆ socket()

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

Definition at line 9035 of file httplib.h.

◆ stop()

void httplib::ClientImpl::stop ( )
inline

Definition at line 9000 of file httplib.h.

◆ write_content_with_provider()

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

Definition at line 8048 of file httplib.h.

Member Data Documentation

◆ addr_map_

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

Definition at line 1258 of file httplib.h.

◆ address_family_

int httplib::ClientImpl::address_family_ = AF_UNSPEC
protected

Definition at line 1287 of file httplib.h.

◆ basic_auth_password_

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

Definition at line 1275 of file httplib.h.

◆ basic_auth_username_

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

Definition at line 1274 of file httplib.h.

◆ bearer_token_auth_token_

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

Definition at line 1276 of file httplib.h.

◆ client_cert_path_

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

Definition at line 1264 of file httplib.h.

◆ client_key_path_

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

Definition at line 1265 of file httplib.h.

◆ compress_

bool httplib::ClientImpl::compress_ = false
protected

Definition at line 1291 of file httplib.h.

◆ connection_timeout_sec_

time_t httplib::ClientImpl::connection_timeout_sec_ = CPPHTTPLIB_CONNECTION_TIMEOUT_SECOND
protected

Definition at line 1267 of file httplib.h.

◆ connection_timeout_usec_

time_t httplib::ClientImpl::connection_timeout_usec_ = CPPHTTPLIB_CONNECTION_TIMEOUT_USECOND
protected

Definition at line 1268 of file httplib.h.

◆ decompress_

bool httplib::ClientImpl::decompress_ = true
protected

Definition at line 1292 of file httplib.h.

◆ default_headers_

Headers httplib::ClientImpl::default_headers_
protected

Definition at line 1261 of file httplib.h.

◆ follow_location_

bool httplib::ClientImpl::follow_location_ = false
protected

Definition at line 1283 of file httplib.h.

◆ host_

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

Definition at line 1243 of file httplib.h.

◆ host_and_port_

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

Definition at line 1245 of file httplib.h.

◆ interface_

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

Definition at line 1294 of file httplib.h.

◆ keep_alive_

bool httplib::ClientImpl::keep_alive_ = false
protected

Definition at line 1282 of file httplib.h.

◆ logger_

Logger httplib::ClientImpl::logger_
protected

Definition at line 1318 of file httplib.h.

◆ port_

const int httplib::ClientImpl::port_
protected

Definition at line 1244 of file httplib.h.

◆ proxy_basic_auth_password_

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

Definition at line 1300 of file httplib.h.

◆ proxy_basic_auth_username_

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

Definition at line 1299 of file httplib.h.

◆ proxy_bearer_token_auth_token_

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

Definition at line 1301 of file httplib.h.

◆ proxy_host_

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

Definition at line 1296 of file httplib.h.

◆ proxy_port_

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

Definition at line 1297 of file httplib.h.

◆ read_timeout_sec_

time_t httplib::ClientImpl::read_timeout_sec_ = CPPHTTPLIB_READ_TIMEOUT_SECOND
protected

Definition at line 1269 of file httplib.h.

◆ read_timeout_usec_

time_t httplib::ClientImpl::read_timeout_usec_ = CPPHTTPLIB_READ_TIMEOUT_USECOND
protected

Definition at line 1270 of file httplib.h.

◆ request_mutex_

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

Definition at line 1250 of file httplib.h.

◆ socket_

Socket httplib::ClientImpl::socket_
protected

Definition at line 1248 of file httplib.h.

◆ socket_mutex_

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

Definition at line 1249 of file httplib.h.

◆ socket_options_

SocketOptions httplib::ClientImpl::socket_options_ = nullptr
protected

Definition at line 1289 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 1254 of file httplib.h.

◆ socket_requests_in_flight_

size_t httplib::ClientImpl::socket_requests_in_flight_ = 0
protected

Definition at line 1253 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 1255 of file httplib.h.

◆ tcp_nodelay_

bool httplib::ClientImpl::tcp_nodelay_ = CPPHTTPLIB_TCP_NODELAY
protected

Definition at line 1288 of file httplib.h.

◆ url_encode_

bool httplib::ClientImpl::url_encode_ = true
protected

Definition at line 1285 of file httplib.h.

◆ write_timeout_sec_

time_t httplib::ClientImpl::write_timeout_sec_ = CPPHTTPLIB_WRITE_TIMEOUT_SECOND
protected

Definition at line 1271 of file httplib.h.

◆ write_timeout_usec_

time_t httplib::ClientImpl::write_timeout_usec_ = CPPHTTPLIB_WRITE_TIMEOUT_USECOND
protected

Definition at line 1272 of file httplib.h.


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