mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-13 22:40:01 -04:00
add old v0.4 code
This commit is contained in:
parent
582bbd4ecd
commit
9205ae1507
14 changed files with 340 additions and 180 deletions
|
@ -83,6 +83,13 @@ CURL* start_request(const char* url, const char* json_params, DataCallback data_
|
|||
curl_easy_setopt(http_handle, CURLOPT_VERBOSE, 1L);
|
||||
}
|
||||
|
||||
if (strcmp(key, "_connect_only") == 0) {
|
||||
curl_easy_setopt(http_handle, CURLOPT_CONNECT_ONLY, 1L);
|
||||
curl_easy_setopt(http_handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
||||
curl_easy_setopt(http_handle, CURLOPT_SSL_ENABLE_ALPN, 0L);
|
||||
prevent_cleanup = 1;
|
||||
}
|
||||
|
||||
if (strcmp(key, "method") == 0 && cJSON_IsString(item)) {
|
||||
curl_easy_setopt(http_handle, CURLOPT_CUSTOMREQUEST, item->valuestring);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue