1CURLOPT_STDERR(3)                   libcurl                  CURLOPT_STDERR(3)
2
3
4

NAME

6       CURLOPT_STDERR - redirect stderr to another stream
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STDERR, FILE *stream);
12

DESCRIPTION

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
18       If  you are using libcurl as a win32 DLL, this option will cause an ex‐
19       ception and crash in the library since it cannot access a FILE * passed
20       on from the application. A work-around is to instead use CURLOPT_DEBUG‐
21       FUNCTION(3).
22

DEFAULT

24       stderr
25

PROTOCOLS

27       All
28

EXAMPLE

30       CURL *curl = curl_easy_init();
31       FILE *filep = fopen("dump", "wb");
32       if(curl) {
33         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
34         curl_easy_setopt(curl, CURLOPT_STDERR, filep);
35
36         curl_easy_perform(curl);
37       }
38

AVAILABILITY

40       Always
41

RETURN VALUE

43       Returns CURLE_OK
44

SEE ALSO

46       CURLOPT_VERBOSE(3), CURLOPT_NOPROGRESS(3), CURLOPT_DEBUGFUNCTION(3)
47
48
49
50ibcurl 8.2.1                    April 26, 2023               CURLOPT_STDERR(3)
Impressum