mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-13 06:20:02 -04:00
support http/2
This commit is contained in:
parent
8bcfc2157c
commit
baab0aea8f
6 changed files with 36 additions and 3 deletions
|
@ -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://")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue