aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-10-21 13:06:22 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-10-21 13:06:22 +0200
commit411103251130767daab1b0d966a674b6b822707e (patch)
treec2ca4f64b783385c8c1cb820263b34d8cd59a704 /docs
parent50313059fcf4bdd109652730fd935995a5bcd9e0 (diff)
CURLOPT_RANGE.3: works for SFTP as well
... and added a small example
Diffstat (limited to 'docs')
-rw-r--r--docs/libcurl/opts/CURLOPT_RANGE.317
1 files changed, 14 insertions, 3 deletions
diff --git a/docs/libcurl/opts/CURLOPT_RANGE.3 b/docs/libcurl/opts/CURLOPT_RANGE.3
index 48c3ed9b8..25c3f6502 100644
--- a/docs/libcurl/opts/CURLOPT_RANGE.3
+++ b/docs/libcurl/opts/CURLOPT_RANGE.3
@@ -43,13 +43,24 @@ Pass a NULL to this option to disable the use of ranges.
.SH DEFAULT
NULL
.SH PROTOCOLS
-HTTP, FTP, FILE and RTSP
+HTTP, FTP, FILE, RTSP and SFTP.
.SH EXAMPLE
-TODO
+.nf
+curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* get the first 200 bytes */
+ curl_easy_setopt(curl, CURLOPT_RANGE, "0-199");
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
.SH AVAILABILITY
FILE since 7.18.0, RTSP since 7.20.0
.SH RETURN VALUE
Returns CURLE_OK on success or
CURLE_OUT_OF_MEMORY if there was insufficient heap space.
.SH "SEE ALSO"
-.BR CURLOPT_RESUME_FROM "(3), "
+.BR CURLOPT_RESUME_FROM "(3), "