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  data to the server without having libcurl do a
16       strlen() to measure the data size, this option must be used. When  this
17       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.
20

DEFAULT

22       -1
23

PROTOCOLS

25       HTTP(S)
26

EXAMPLE

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

AVAILABILITY

44       Along with HTTP
45

RETURN VALUE

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

SEE ALSO

50       CURLOPT_POSTFIELDS(3),   CURLOPT_COPYPOSTFIELDS(3),  CURLOPT_POSTFIELD‐
51       SIZE(3),
52
53
54
55libcurl 7.76.1                 November 04, 2020CURLOPT_POSTFIELDSIZE_LARGE(3)
Impressum