1CURLOPT_POSTFIELDSIZE_LARGE(c3u)rl_easy_setopt optioCnUsRLOPT_POSTFIELDSIZE_LARGE(3)
2
3
4

NAME

6       CURLOPT_POSTFIELDSIZE_LARGE - size of POST data pointed to
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDSIZE_LARGE,
12                                 curl_off_t size);
13

DESCRIPTION

15       If you want to post static data to the server without having libcurl do
16       a strlen() to measure the data size, this option  must  be  used.  When
17       this  option is used you can post fully binary data, which otherwise is
18       likely to fail. If this size  is  set  to  -1,  the  library  will  use
19       strlen()  to get the size or rely on the CURLOPT_READFUNCTION (if used)
20       to signal the end of data.
21

DEFAULT

23       -1
24

PROTOCOLS

26       HTTP(S)
27

EXAMPLE

29       CURL *curl = curl_easy_init();
30       if(curl) {
31         const char *data = large_chunk;
32         curl_off_t length_of_data; /* set somehow */
33
34         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
35
36         /* size of the POST data */
37         curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, length_of_data);
38
39         curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
40
41         curl_easy_perform(curl);
42       }
43

AVAILABILITY

45       Along with HTTP
46

RETURN VALUE

48       Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
49

SEE ALSO

51       CURLOPT_POSTFIELDS(3),  CURLOPT_COPYPOSTFIELDS(3),   CURLOPT_POSTFIELD‐
52       SIZE(3),
53
54
55
56libcurl 8.0.1                  January 17, 2023 CURLOPT_POSTFIELDSIZE_LARGE(3)
Impressum