D++ (DPP)
C++ Discord API Bot Library
|
#include <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 char *path) |
Result | Get (const char *path, const Headers &headers) |
Result | Get (const char *path, Progress progress) |
Result | Get (const char *path, const Headers &headers, Progress progress) |
Result | Get (const char *path, ContentReceiver content_receiver) |
Result | Get (const char *path, const Headers &headers, ContentReceiver content_receiver) |
Result | Get (const char *path, ContentReceiver content_receiver, Progress progress) |
Result | Get (const char *path, const Headers &headers, ContentReceiver content_receiver, Progress progress) |
Result | Get (const char *path, ResponseHandler response_handler, ContentReceiver content_receiver) |
Result | Get (const char *path, const Headers &headers, ResponseHandler response_handler, ContentReceiver content_receiver) |
Result | Get (const char *path, ResponseHandler response_handler, ContentReceiver content_receiver, Progress progress) |
Result | Get (const char *path, const Headers &headers, ResponseHandler response_handler, ContentReceiver content_receiver, Progress progress) |
Result | Get (const char *path, const Params ¶ms, const Headers &headers, Progress progress=nullptr) |
Result | Get (const char *path, const Params ¶ms, const Headers &headers, ContentReceiver content_receiver, Progress progress=nullptr) |
Result | Get (const char *path, const Params ¶ms, const Headers &headers, ResponseHandler response_handler, ContentReceiver content_receiver, Progress progress=nullptr) |
Result | Head (const char *path) |
Result | Head (const char *path, const Headers &headers) |
Result | Post (const char *path) |
Result | Post (const char *path, const char *body, size_t content_length, const char *content_type) |
Result | Post (const char *path, const Headers &headers, const char *body, size_t content_length, const char *content_type) |
Result | Post (const char *path, const std::string &body, const char *content_type) |
Result | Post (const char *path, const Headers &headers, const std::string &body, const char *content_type) |
Result | Post (const char *path, size_t content_length, ContentProvider content_provider, const char *content_type) |
Result | Post (const char *path, ContentProviderWithoutLength content_provider, const char *content_type) |
Result | Post (const char *path, const Headers &headers, size_t content_length, ContentProvider content_provider, const char *content_type) |
Result | Post (const char *path, const Headers &headers, ContentProviderWithoutLength content_provider, const char *content_type) |
Result | Post (const char *path, const Params ¶ms) |
Result | Post (const char *path, const Headers &headers, const Params ¶ms) |
Result | Post (const char *path, const MultipartFormDataItems &items) |
Result | Post (const char *path, const Headers &headers, const MultipartFormDataItems &items) |
Result | Post (const char *path, const Headers &headers, const MultipartFormDataItems &items, const std::string &boundary) |
Result | Put (const char *path) |
Result | Put (const char *path, const char *body, size_t content_length, const char *content_type) |
Result | Put (const char *path, const Headers &headers, const char *body, size_t content_length, const char *content_type) |
Result | Put (const char *path, const std::string &body, const char *content_type) |
Result | Put (const char *path, const Headers &headers, const std::string &body, const char *content_type) |
Result | Put (const char *path, size_t content_length, ContentProvider content_provider, const char *content_type) |
Result | Put (const char *path, ContentProviderWithoutLength content_provider, const char *content_type) |
Result | Put (const char *path, const Headers &headers, size_t content_length, ContentProvider content_provider, const char *content_type) |
Result | Put (const char *path, const Headers &headers, ContentProviderWithoutLength content_provider, const char *content_type) |
Result | Put (const char *path, const Params ¶ms) |
Result | Put (const char *path, const Headers &headers, const Params ¶ms) |
Result | Patch (const char *path) |
Result | Patch (const char *path, const char *body, size_t content_length, const char *content_type) |
Result | Patch (const char *path, const Headers &headers, const char *body, size_t content_length, const char *content_type) |
Result | Patch (const char *path, const std::string &body, const char *content_type) |
Result | Patch (const char *path, const Headers &headers, const std::string &body, const char *content_type) |
Result | Patch (const char *path, size_t content_length, ContentProvider content_provider, const char *content_type) |
Result | Patch (const char *path, ContentProviderWithoutLength content_provider, const char *content_type) |
Result | Patch (const char *path, const Headers &headers, size_t content_length, ContentProvider content_provider, const char *content_type) |
Result | Patch (const char *path, const Headers &headers, ContentProviderWithoutLength content_provider, const char *content_type) |
Result | Delete (const char *path) |
Result | Delete (const char *path, const Headers &headers) |
Result | Delete (const char *path, const char *body, size_t content_length, const char *content_type) |
Result | Delete (const char *path, const Headers &headers, const char *body, size_t content_length, const char *content_type) |
Result | Delete (const char *path, const std::string &body, const char *content_type) |
Result | Delete (const char *path, const Headers &headers, const std::string &body, const char *content_type) |
Result | Options (const char *path) |
Result | Options (const char *path, const Headers &headers) |
bool | send (Request &req, Response &res, Error &error) |
Result | send (const Request &req) |
size_t | is_socket_open () const |
void | stop () |
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 char *username, const char *password) |
void | set_bearer_token_auth (const char *token) |
void | set_keep_alive (bool on) |
void | set_follow_location (bool on) |
void | set_compress (bool on) |
void | set_decompress (bool on) |
void | set_interface (const char *intf) |
void | set_proxy (const char *host, int port) |
void | set_proxy_basic_auth (const char *username, const char *password) |
void | set_proxy_bearer_token_auth (const char *token) |
void | set_logger (Logger logger) |
Protected Member Functions | |
Result | send_ (Request &&req) |
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) |
void | lock_socket_and_shutdown_and_close () |
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) |
|
explicit |
|
explicit |
|
explicit |
|
virtual |
|
protected |
|
protected |
|
protectedvirtual |
Result httplib::ClientImpl::Delete | ( | const char * | path | ) |
Result httplib::ClientImpl::Delete | ( | const char * | path, |
const char * | body, | ||
size_t | content_length, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Delete | ( | const char * | path, |
const Headers & | headers, | ||
const char * | body, | ||
size_t | content_length, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Delete | ( | const char * | path, |
const Headers & | headers, | ||
const std::string & | body, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Delete | ( | const char * | path, |
const std::string & | body, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Get | ( | const char * | path | ) |
Result httplib::ClientImpl::Get | ( | const char * | path, |
const Headers & | headers, | ||
ContentReceiver | content_receiver | ||
) |
Result httplib::ClientImpl::Get | ( | const char * | path, |
const Headers & | headers, | ||
ContentReceiver | content_receiver, | ||
Progress | progress | ||
) |
Result httplib::ClientImpl::Get | ( | const char * | path, |
const Headers & | headers, | ||
ResponseHandler | response_handler, | ||
ContentReceiver | content_receiver | ||
) |
Result httplib::ClientImpl::Get | ( | const char * | path, |
const Headers & | headers, | ||
ResponseHandler | response_handler, | ||
ContentReceiver | content_receiver, | ||
Progress | progress | ||
) |
Result httplib::ClientImpl::Get | ( | const char * | path, |
const Params & | params, | ||
const Headers & | headers, | ||
ContentReceiver | content_receiver, | ||
Progress | progress = nullptr |
||
) |
Result httplib::ClientImpl::Get | ( | const char * | path, |
const Params & | params, | ||
const Headers & | headers, | ||
Progress | progress = nullptr |
||
) |
Result httplib::ClientImpl::Get | ( | const char * | path, |
const Params & | params, | ||
const Headers & | headers, | ||
ResponseHandler | response_handler, | ||
ContentReceiver | content_receiver, | ||
Progress | progress = nullptr |
||
) |
Result httplib::ClientImpl::Get | ( | const char * | path, |
ContentReceiver | content_receiver | ||
) |
Result httplib::ClientImpl::Get | ( | const char * | path, |
ContentReceiver | content_receiver, | ||
Progress | progress | ||
) |
Result httplib::ClientImpl::Get | ( | const char * | path, |
ResponseHandler | response_handler, | ||
ContentReceiver | content_receiver | ||
) |
Result httplib::ClientImpl::Get | ( | const char * | path, |
ResponseHandler | response_handler, | ||
ContentReceiver | content_receiver, | ||
Progress | progress | ||
) |
Result httplib::ClientImpl::Head | ( | const char * | path | ) |
size_t httplib::ClientImpl::is_socket_open | ( | ) | const |
|
virtual |
|
protected |
Result httplib::ClientImpl::Options | ( | const char * | path | ) |
Result httplib::ClientImpl::Patch | ( | const char * | path | ) |
Result httplib::ClientImpl::Patch | ( | const char * | path, |
const char * | body, | ||
size_t | content_length, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Patch | ( | const char * | path, |
const Headers & | headers, | ||
const char * | body, | ||
size_t | content_length, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Patch | ( | const char * | path, |
const Headers & | headers, | ||
const std::string & | body, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Patch | ( | const char * | path, |
const Headers & | headers, | ||
ContentProviderWithoutLength | content_provider, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Patch | ( | const char * | path, |
const Headers & | headers, | ||
size_t | content_length, | ||
ContentProvider | content_provider, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Patch | ( | const char * | path, |
const std::string & | body, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Patch | ( | const char * | path, |
ContentProviderWithoutLength | content_provider, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Patch | ( | const char * | path, |
size_t | content_length, | ||
ContentProvider | content_provider, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Post | ( | const char * | path | ) |
Result httplib::ClientImpl::Post | ( | const char * | path, |
const char * | body, | ||
size_t | content_length, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Post | ( | const char * | path, |
const Headers & | headers, | ||
const char * | body, | ||
size_t | content_length, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Post | ( | const char * | path, |
const Headers & | headers, | ||
const MultipartFormDataItems & | items | ||
) |
Result httplib::ClientImpl::Post | ( | const char * | path, |
const Headers & | headers, | ||
const MultipartFormDataItems & | items, | ||
const std::string & | boundary | ||
) |
Result httplib::ClientImpl::Post | ( | const char * | path, |
const Headers & | headers, | ||
const Params & | params | ||
) |
Result httplib::ClientImpl::Post | ( | const char * | path, |
const Headers & | headers, | ||
const std::string & | body, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Post | ( | const char * | path, |
const Headers & | headers, | ||
ContentProviderWithoutLength | content_provider, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Post | ( | const char * | path, |
const Headers & | headers, | ||
size_t | content_length, | ||
ContentProvider | content_provider, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Post | ( | const char * | path, |
const MultipartFormDataItems & | items | ||
) |
Result httplib::ClientImpl::Post | ( | const char * | path, |
const std::string & | body, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Post | ( | const char * | path, |
ContentProviderWithoutLength | content_provider, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Post | ( | const char * | path, |
size_t | content_length, | ||
ContentProvider | content_provider, | ||
const char * | content_type | ||
) |
|
protected |
Result httplib::ClientImpl::Put | ( | const char * | path | ) |
Result httplib::ClientImpl::Put | ( | const char * | path, |
const char * | body, | ||
size_t | content_length, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Put | ( | const char * | path, |
const Headers & | headers, | ||
const char * | body, | ||
size_t | content_length, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Put | ( | const char * | path, |
const Headers & | headers, | ||
const Params & | params | ||
) |
Result httplib::ClientImpl::Put | ( | const char * | path, |
const Headers & | headers, | ||
const std::string & | body, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Put | ( | const char * | path, |
const Headers & | headers, | ||
ContentProviderWithoutLength | content_provider, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Put | ( | const char * | path, |
const Headers & | headers, | ||
size_t | content_length, | ||
ContentProvider | content_provider, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Put | ( | const char * | path, |
const std::string & | body, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Put | ( | const char * | path, |
ContentProviderWithoutLength | content_provider, | ||
const char * | content_type | ||
) |
Result httplib::ClientImpl::Put | ( | const char * | path, |
size_t | content_length, | ||
ContentProvider | content_provider, | ||
const char * | content_type | ||
) |
void httplib::ClientImpl::set_address_family | ( | int | family | ) |
void httplib::ClientImpl::set_basic_auth | ( | const char * | username, |
const char * | password | ||
) |
void httplib::ClientImpl::set_bearer_token_auth | ( | const char * | token | ) |
void httplib::ClientImpl::set_compress | ( | bool | on | ) |
void httplib::ClientImpl::set_connection_timeout | ( | const std::chrono::duration< Rep, Period > & | duration | ) |
void httplib::ClientImpl::set_connection_timeout | ( | time_t | sec, |
time_t | usec = 0 |
||
) |
void httplib::ClientImpl::set_decompress | ( | bool | on | ) |
void httplib::ClientImpl::set_default_headers | ( | Headers | headers | ) |
void httplib::ClientImpl::set_follow_location | ( | bool | on | ) |
void httplib::ClientImpl::set_interface | ( | const char * | intf | ) |
void httplib::ClientImpl::set_keep_alive | ( | bool | on | ) |
void httplib::ClientImpl::set_logger | ( | Logger | logger | ) |
void httplib::ClientImpl::set_proxy | ( | const char * | host, |
int | port | ||
) |
void httplib::ClientImpl::set_proxy_basic_auth | ( | const char * | username, |
const char * | password | ||
) |
void httplib::ClientImpl::set_proxy_bearer_token_auth | ( | const char * | token | ) |
void httplib::ClientImpl::set_read_timeout | ( | const std::chrono::duration< Rep, Period > & | duration | ) |
void httplib::ClientImpl::set_read_timeout | ( | time_t | sec, |
time_t | usec = 0 |
||
) |
void httplib::ClientImpl::set_socket_options | ( | SocketOptions | socket_options | ) |
void httplib::ClientImpl::set_tcp_nodelay | ( | bool | on | ) |
void httplib::ClientImpl::set_write_timeout | ( | const std::chrono::duration< Rep, Period > & | duration | ) |
void httplib::ClientImpl::set_write_timeout | ( | time_t | sec, |
time_t | usec = 0 |
||
) |
|
protected |
|
protectedvirtual |
void httplib::ClientImpl::stop | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |