|
| | Client (const std::string &host) |
| | Constructor to initialize the client with a hostname.
|
| |
| | Client (const std::string &host, int port) |
| | Constructor to initialize the client with a hostname and port.
|
| |
| | Client (const std::string &host, int port, const std::string &server_ca) |
| | Constructor to initialize the client with a hostname, port, and server CA certificate.
|
| |
| virtual | ~Client ()=default |
| | Destructor to clean up resources.
|
| |
| Result | Get (const std::string &path, int time_out_sec=SSGX_HTTP_CLIENT_TIMEOUT) |
| | Sends a GET request.
|
| |
| Result | Get (const std::string &path, const TypeHeaders &headers, int time_out_sec=SSGX_HTTP_CLIENT_TIMEOUT) |
| | Sends a GET request with HTTP headers.
|
| |
| Result | Get (const std::string &path, const TypeParams ¶ms, int time_out_sec=SSGX_HTTP_CLIENT_TIMEOUT) |
| | Sends a GET request with URL parameters.
|
| |
| Result | Get (const std::string &path, const TypeHeaders &headers, const TypeParams ¶ms, int time_out_sec=SSGX_HTTP_CLIENT_TIMEOUT) |
| | Sends a GET request with HTTP headers and URL parameters.
|
| |
| Result | Post (const std::string &path, int time_out_sec=SSGX_HTTP_CLIENT_TIMEOUT) |
| | Sends a POST request.
|
| |
| Result | Post (const std::string &path, const TypeHeaders &headers, int time_out_sec=SSGX_HTTP_CLIENT_TIMEOUT) |
| | Sends a POST request with HTTP headers.
|
| |
| Result | Post (const std::string &path, const char *body, size_t content_length, const std::string &content_type, int time_out_sec=SSGX_HTTP_CLIENT_TIMEOUT) |
| | Sends a POST request with a body.
|
| |
| Result | Post (const std::string &path, const TypeHeaders &headers, const char *body, size_t content_length, const std::string &content_type, int time_out_sec=SSGX_HTTP_CLIENT_TIMEOUT) |
| | Sends a POST request with HTTP headers and a body.
|
| |
| Result | Post (const std::string &path, const std::string &body, const std::string &content_type, int time_out_sec=SSGX_HTTP_CLIENT_TIMEOUT) |
| | Sends a POST request with a body.
|
| |
| Result | Post (const std::string &path, const TypeHeaders &headers, const std::string &body, const std::string &content_type, int time_out_sec=SSGX_HTTP_CLIENT_TIMEOUT) |
| | Sends a POST request with HTTP headers and a body.
|
| |
Client class for making HTTP and HTTPS requests.
This class encapsulates the functionality required to connect to an HTTP/HTTPS server and send requests using common methods like GET and POST. It supports setting custom headers, URL parameters, request bodies, and timeouts. For HTTPS connections, it handles server certificate verification against either the system's default CA certificate store or a user-provided CA certificate.