GNURLINFO_SIZE_UPLOAD_T(3)
π GNURLINFO_SIZE_UPLOAD_T(3) π
okay bestie, welcome to the curl_easy_getinfo options manual β this page is all about grabbing the upload byte count, and yes, we are keeping every single detail π
β¨
β¨ NAME β¨
CURLINFO_SIZE_UPLOAD_T β get the number of uploaded bytes π«Ά
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_UPLOAD_T,
curl_off_t *uploadp);
β¨ DESCRIPTION β¨
Pass a pointer to a curl_off_t to receive the total amount of bytes that were uploaded. That's the whole vibe: you hand over the pointer, it hands back the number β¨.
π PROTOCOLS π
All β literally all of them, no cap.
π§ 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) {
curl_off_t ul;
res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &ul);
if(!res) {
printf("Uploaded %" CURL_FORMAT_CURL_OFF_T " bytes\n", ul);
}
}
}
π AVAILABILITY π
Added in 7.55.0 β vintage but still iconic π
π RETURN VALUE π
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. No drama, just those two.
πΈ SEE ALSO πΈ
and yes bestie, the original list has a trailing comma after CURLINFO_SIZE_UPLOAD(3) β iykyk π
this page is libcurl 7.55.0, dated 25 May 2017 β bye bestie, go get those uploaded bytes πβ¨π¦
π¦ 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