GNURLINFO_REQUEST_SIZE(3)
π GNURLINFO_REQUEST_SIZE(3): get size of sent request π
okay so bestie, this page is GNURLINFO_REQUEST_SIZE(3) from the curl_easy_getinfo options manual, and it's literally all about asking βhow big was the request we sent?β β¨ no cap.
πΈ NAME πΈ
CURLINFO_REQUEST_SIZE β get size of sent request π
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REQUEST_SIZE, long
*sizep);
π¦ DESCRIPTION π¦
You pass in a pointer to a long, and it receives the total size of the issued requests. So far, this is only for HTTP requests β that's the vibe check on it. π
Also highkey note: this may be more than one request if CURLOPT_FOLLOWLOCATION(3) is enabled. Like, the total can cover multiple requests in that case, periodt. π
π PROTOCOLS π
All β every protocol, no cap. β
π§ 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 req;
res = curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &req);
if(!res)
printf("Request size: %ld bytes\n", req);
}
curl_easy_cleanup(curl);
}
π AVAILABILITY π
Added in 7.4.1 β iconic since day one. π«Ά
π₯ RETURN VALUE π₯
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. That's the whole mood. π
π SEE ALSO π
mwah πβ¨ cute little sign-off: this page is from libcurl 7.44.0, dated 1 Sep 2015, and it ate. ππ
π¦ 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