support http/2

This commit is contained in:
ading2210 2024-01-17 17:46:08 -05:00
parent 8bcfc2157c
commit baab0aea8f
6 changed files with 36 additions and 3 deletions

View file

@ -72,6 +72,7 @@ void start_request(const char* url, const char* json_params, DataCallback data_c
//some default options
curl_easy_setopt(http_handle, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(http_handle, CURLOPT_ACCEPT_ENCODING, "");
curl_easy_setopt(http_handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
//if url is a websocket, tell curl that we should handle the connection manually
if (starts_with(url, "wss://") || starts_with(url, "ws://")) {