GNURLINFO_HEADER_SIZE(3)
π NAME π
okay so this is the page for GNURLINFO_HEADER_SIZE(3), and the manual name is curl_easy_getinfo options π«Ά The NAME itself is CURLINFO_HEADER_SIZE β get size of retrieved headers. Not me noticing the page header and the NAME donβt match exactly π thatβs just how itβs written, bestie π
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HEADER_SIZE, long
*sizep);
π¦ DESCRIPTION π¦
Pass a pointer to a long to receive the total size of all the headers received. Measured in number of bytes, no cap π
The total includes the size of any received headers suppressed by CURLOPT_SUPPRESS_CONNECT_HEADERS(3). The way that detail matters is honestly iconic β¨
π PROTOCOLS π
All β every protocol, periodt π
π EXAMPLE π
CURL *curl = curl_easy_init();
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
res = curl_easy_perform(curl);
if(res == CURLE_OK) {
long size;
res = curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &size);
if(!res)
printf("Header size: %ld bytes\n", size);
}
curl_easy_cleanup(curl);
}
πΈ AVAILABILITY πΈ
Added in 7.4.1 β
π RETURN VALUE π
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. Simple as that, bestie π«Ά
π SEE ALSO π
bye bestie! this page is from libcurl 7.44.0, dated 1 Sep 2015 ππ
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, 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