GNURLINFO_SIZE_UPLOAD(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

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