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

NAME

6       CURLINFO_HEADER_SIZE - get size of retrieved headers
7

SYNOPSIS

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

DESCRIPTION

15       Pass a pointer to a long to receive the total size of all  the  headers
16       received. Measured in number of bytes.
17
18       The  total includes the size of any received headers suppressed by CUR‐
19       LOPT_SUPPRESS_CONNECT_HEADERS(3).
20

PROTOCOLS

22       All
23

EXAMPLE

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

AVAILABILITY

40       Added in 7.4.1
41

RETURN VALUE

43       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
44       if not.
45

SEE ALSO

47       curl_easy_getinfo(3),   curl_easy_setopt(3),  CURLINFO_REQUEST_SIZE(3),
48       CURLINFO_SIZE_DOWNLOAD(3),
49
50
51
52libcurl 7.64.0                   May 06, 2017          CURLINFO_HEADER_SIZE(3)
Impressum