Sortix 1.1dev ports manual
This manual documents Sortix 1.1dev ports. You can instead view this document in the latest official manual.
CURLOPT_DEFAULT_PROTOCOL(3) | curl_easy_setopt options | CURLOPT_DEFAULT_PROTOCOL(3) |
NAME
CURLOPT_DEFAULT_PROTOCOL - default protocol to use if the URL is missing a scheme nameSYNOPSIS
#include <curl/curl.h>DESCRIPTION
This option tells libcurl to use protocol if the URL is missing a scheme name.DEFAULT
NULL (make a guess based on the host)PROTOCOLS
AllEXAMPLE
curl = curl_easy_init(); if(curl) { /* set a URL without a scheme */ curl_easy_setopt(curl, CURLOPT_URL, "example.com"); /* set the default protocol (scheme) for schemeless URLs */ curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https"); /* Perform the request */ curl_easy_perform(curl); }
AVAILABILITY
Added in 7.45.0RETURN VALUE
CURLE_OK if the option is supported.SEE ALSO
CURLOPT_URL(3),December 21, 2016 | libcurl 7.69.0 |