mirror of
https://codeberg.org/kiss-community/repo
synced 2024-11-20 05:30:11 -07:00
45 lines
1.1 KiB
Groff
45 lines
1.1 KiB
Groff
|
.\" generated by cd2nroff 0.1 from CURLOPT_STDERR.md
|
||
|
.TH CURLOPT_STDERR 3 "March 15 2024" libcurl
|
||
|
.SH NAME
|
||
|
CURLOPT_STDERR \- redirect stderr to another stream
|
||
|
.SH SYNOPSIS
|
||
|
.nf
|
||
|
#include <curl/curl.h>
|
||
|
|
||
|
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STDERR, FILE *stream);
|
||
|
.fi
|
||
|
.SH DESCRIPTION
|
||
|
Pass a FILE * as parameter. Tell libcurl to use this \fIstream\fP instead of
|
||
|
stderr when showing the progress meter and displaying \fICURLOPT_VERBOSE(3)\fP
|
||
|
data.
|
||
|
|
||
|
If you are using libcurl as a Windows DLL, this option causes an exception and
|
||
|
a crash in the library since it cannot access a FILE * passed on from the
|
||
|
application. A work\-around is to instead use \fICURLOPT_DEBUGFUNCTION(3)\fP.
|
||
|
.SH DEFAULT
|
||
|
stderr
|
||
|
.SH PROTOCOLS
|
||
|
All
|
||
|
.SH EXAMPLE
|
||
|
.nf
|
||
|
int main(void)
|
||
|
{
|
||
|
CURL *curl = curl_easy_init();
|
||
|
FILE *filep = fopen("dump", "wb");
|
||
|
if(curl) {
|
||
|
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||
|
curl_easy_setopt(curl, CURLOPT_STDERR, filep);
|
||
|
|
||
|
curl_easy_perform(curl);
|
||
|
}
|
||
|
}
|
||
|
.fi
|
||
|
.SH AVAILABILITY
|
||
|
Always
|
||
|
.SH RETURN VALUE
|
||
|
Returns CURLE_OK
|
||
|
.SH SEE ALSO
|
||
|
.BR CURLOPT_DEBUGFUNCTION (3),
|
||
|
.BR CURLOPT_NOPROGRESS (3),
|
||
|
.BR CURLOPT_VERBOSE (3)
|