mirror of
https://github.com/curl/curl.git
synced 2026-08-03 17:50:28 +03:00
examples: make use of CURLOPT_(REDIR_|)PROTOCOLS_STR
To show how to use them Closes #11334
This commit is contained in:
parent
b39181cedc
commit
741b6853b9
2 changed files with 5 additions and 0 deletions
|
|
@ -58,6 +58,9 @@ int main(void)
|
|||
curl_easy_setopt(curl, CURLOPT_CURLU, urlp);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
/* only allow HTTP, TFTP and SFTP */
|
||||
curl_easy_setopt(curl, CURLOPT_PROTOCOLS_STR, "http,tftp,sftp");
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
/* Check for errors */
|
||||
if(res != CURLE_OK)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue