aboutsummaryrefslogtreecommitdiff
path: root/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-10-21 08:58:03 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-10-21 08:58:24 +0200
commitc857bb68ec37f82b62238fca73942e6ede8bd8f7 (patch)
tree084c1ff2355e2b3ce77c8a69bec4657a78cbfcc2 /docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3
parent005f2adaaa8025849760b30289e06916ea25f548 (diff)
opts: added examples
Diffstat (limited to 'docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3')
-rw-r--r--docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.320
1 files changed, 18 insertions, 2 deletions
diff --git a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3 b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3
index 2bcb67e75..50fc3519c 100644
--- a/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3
+++ b/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3
@@ -37,12 +37,28 @@ set to -1, the library will use strlen() to get the size.
.SH DEFAULT
-1
.SH PROTOCOLS
-HTTP
+HTTP(S)
.SH EXAMPLE
-TODO
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ const char *data = large_chunk;
+ curl_off_t length_of_data; /* set somehow */
+
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* size of the POST data */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, length_of_data);
+
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
+
+ curl_easy_perform(curl);
+}
+.fi
.SH AVAILABILITY
Along with HTTP
.SH RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR CURLOPT_POSTFIELDS "(3), " CURLOPT_COPYPOSTFIELDS "(3), "
+.BR CURLOPT_POSTFIELDSIZE "(3), "