1CURLINFO_SIZE_UPLOAD(3)    curl_easy_getinfo options   CURLINFO_SIZE_UPLOAD(3)
2
3
4

NAME

6       CURLINFO_SIZE_UPLOAD - get the number of uploaded bytes
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode  curl_easy_getinfo(CURL  *handle, CURLINFO_SIZE_UPLOAD, double
12       *uploadp);
13

DESCRIPTION

15       Pass a pointer to a double to receive the total amount  of  bytes  that
16       were uploaded.
17
18       CURLINFO_SIZE_UPLOAD_T(3)  is  a  newer replacement that returns a more
19       sensible variable type.
20

PROTOCOLS

22       All
23

EXAMPLE

25       CURL *curl = curl_easy_init();
26       if(curl) {
27         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
28
29         /* Perform the request */
30         res = curl_easy_perform(curl);
31
32         if(!res) {
33           double ul;
34           res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &ul);
35           if(!res) {
36             printf("Uploaded %.0f bytes\n", ul);
37           }
38         }
39       }
40

AVAILABILITY

42       Added in 7.4.1
43

RETURN VALUE

45       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
46       if not.
47

SEE ALSO

49       curl_easy_getinfo(3), curl_easy_setopt(3), CURLINFO_SIZE_DOWNLOAD_T(3),
50       CURLINFO_SIZE_UPLOAD_T(3),
51
52
53
54libcurl 7.79.1                 November 04, 2020       CURLINFO_SIZE_UPLOAD(3)
Impressum