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
12       *sizep);
13

DESCRIPTION

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

PROTOCOLS

20       All
21

EXAMPLE

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

AVAILABILITY

38       Added in 7.4.1
39

RETURN VALUE

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

SEE ALSO

45       curl_easy_getinfo(3),   curl_easy_setopt(3),   CURLINFO_HEADER_SIZE(3),
46       CURLINFO_SIZE_DOWNLOAD(3),
47
48
49
50libcurl 7.61.1                   May 06, 2017         CURLINFO_REQUEST_SIZE(3)
Impressum