1CURLOPT_STDERR(3) curl_easy_setopt options CURLOPT_STDERR(3)
2
3
4
6 CURLOPT_STDERR - redirect stderr to another stream
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STDERR, FILE *stream);
12
14 Pass a FILE * as parameter. Tell libcurl to use this stream instead of
15 stderr when showing the progress meter and displaying CURLOPT_VER‐
16 BOSE(3) data.
17
19 stderr
20
22 All
23
25 CURL *curl = curl_easy_init();
26 FILE *filep = fopen("dump", "wb");
27 if(curl) {
28 curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
29 curl_easy_setopt(curl, CURLOPT_STDERR, filep);
30
31 curl_easy_perform(curl);
32 }
33
35 Always
36
38 Returns CURLE_OK
39
41 CURLOPT_VERBOSE(3), CURLOPT_NOPROGRESS(3),
42
43
44
45libcurl 7.66.0 February 03, 2016 CURLOPT_STDERR(3)