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

NAME

6       CURLINFO_REQUEST_SIZE - get size of sent request
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REQUEST_SIZE, long *sizep);
12

DESCRIPTION

14       Pass  a  pointer  to a long to receive the total size of the issued re‐
15       quests. This is so far only for HTTP requests. Note that  this  may  be
16       more than one request if CURLOPT_FOLLOWLOCATION(3) is enabled.
17

PROTOCOLS

19       All
20

EXAMPLE

22       CURL *curl = curl_easy_init();
23       if(curl) {
24         CURLcode res;
25         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
26         res = curl_easy_perform(curl);
27         if(res == CURLE_OK) {
28           long req;
29           res = curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &req);
30           if(!res)
31             printf("Request size: %ld bytes\n", req);
32         }
33         curl_easy_cleanup(curl);
34       }
35

AVAILABILITY

37       Added in 7.4.1
38

RETURN VALUE

40       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
41       if not.
42

SEE ALSO

44       curl_easy_getinfo(3),   curl_easy_setopt(3),   CURLINFO_HEADER_SIZE(3),
45       CURLINFO_SIZE_DOWNLOAD(3),
46
47
48
49libcurl 7.85.0                   May 17, 2022         CURLINFO_REQUEST_SIZE(3)
Impressum