GNURLINFO_SIZE_UPLOAD(3)
okay bestie, welcome to GNURLINFO_SIZE_UPLOAD(3) β it's one of the curl_easy_getinfo options, and we're gonna get through it together π
β¨
π NAME π
CURLINFO_SIZE_UPLOAD β get the number of uploaded bytes. that's the whole job, no cap π
β¨ SYNOPSIS β¨
include the header and call it like this:
#include <gnurl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_UPLOAD, double
*uploadp);
π¦ DESCRIPTION π¦
Pass a pointer to a double to receive the total amount of bytes that were uploaded. literally just hand over the address and let it fill in the number π«Ά
btw CURLINFO_SIZE_UPLOAD_T(3) is a newer replacement that returns a more sensible variable type π
π PROTOCOLS π
All β every single protocol, periodt π«
πΈ EXAMPLE πΈ
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* Perform the request */
res = curl_easy_perform(curl);
if(!res) {
double ul;
res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &ul);
if(!res) {
printf("Uploaded %.0f bytes\n", ul);
}
}
}
π 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 π
this page came from libcurl 7.44.0, dated 28 Aug 2015, and yes it's the GNURLINFO_SIZE_UPLOAD(3) girlie β byeee ππ
π¦ 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