6 <<
"ready: " << response->ready << std::endl
7 <<
"response: " << std::endl
8 << response->content << std::endl
9 <<
"error_code: " << response->error_code << std::endl
10 <<
"status_code: " << response->status_code << std::endl
11 <<
"----------------------------------------" << std::endl;
17 KURLYK_PRINT <<
"Sending GET request using HttpClient method..." << std::endl;
23 KURLYK_PRINT <<
"Sending GET request using standalone function..." << std::endl;
A client class for making HTTP requests to a specific host.
bool get(const std::string &path, const QueryParams &query, const Headers &headers, HttpResponseCallback callback)
Sends a GET request.
Main header file for the Kurlyk library, providing HTTP and WebSocket support.
std::unique_ptr< HttpResponse > HttpResponsePtr
A unique pointer to an HttpResponse object for memory management.
void deinit()
Deinitializes the Kurlyk library, stopping the network worker and releasing resources.
utils::CaseInsensitiveMultimap Headers
Alias for HTTP headers, providing a case-insensitive unordered multimap.
uint64_t http_get(const std::string &url, const QueryParams &query, const Headers &headers, HttpResponseCallback callback)
Sends an asynchronous HTTP GET request with a callback.
utils::CaseInsensitiveMultimap QueryParams
Alias for query parameters in HTTP requests, stored case-insensitively.
void print_response(const kurlyk::HttpResponsePtr &response)