GNURLOPT_STDERR(3)
π GNURLOPT_STDERR(3) π
okay so bestie, welcome to the GNURLOPT_STDERR page β it lives in the curl_easy_setopt options manual section, and it's genuinely one of the simplest glow-ups in the whole libcurl-adjacent universe. no cap. let's get into it π«Ά
β¨ NAME β¨
CURLOPT_STDERR β redirect stderr to another stream π
π¦ SYNOPSIS π¦
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STDERR, FILE *stream);
πΈ DESCRIPTION πΈ
So you pass in a FILE * as the parameter, right? and you're literally telling libcurl: "bestie, use this stream instead of stderr when you're showing the progress meter and when you're displaying your CURLOPT_VERBOSE(3) data." that's the whole vibe check. that's it. iconic honestly π
π DEFAULT π
stderr β yeah, the default is just plain old stderr, main character energy by default β¨
π PROTOCOLS π
All β every single one, no exceptions, we love an inclusive icon π
π EXAMPLE π
CURL *curl = curl_easy_init();
FILE *filep = fopen("dump", "wb");
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
curl_easy_setopt(curl, CURLOPT_STDERR, filep);
curl_easy_perform(curl);
}
like, look at her go π opening dump in "wb" mode, then yeeting all that stderr output straight into filep. obsessed.
β AVAILABILITY β
Always β she's been here since forever, no "added in version whatever" nonsense, she's a founding member of the group chat π
π₯ RETURN VALUE π₯
Returns CURLE_OK β that's it, that's the whole return, we stan a low-drama return value π§
π SEE ALSO π
alright bestie, that's the page π this little beauty came to you straight from libcurl 7.37.0, dated 17 Jun 2014 β and yes she's still serving the exact same GNURLOPT_STDERR(3) realness she had back then. mwah ππ
β¨
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms