Sortix main manual
This manual documents Sortix main. You can instead view this document in the latest official manual.
CURLOPT_RANGE(3) | curl_easy_setopt options | CURLOPT_RANGE(3) |
NAME
CURLOPT_RANGE - byte range to requestSYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANGE, char *range);
DESCRIPTION
Pass a char * as parameter, which should contain the specified range you want to retrieve. It should be in the format "X-Y", where either X or Y may be left out and X and Y are byte indexes.DEFAULT
NULLPROTOCOLS
HTTP, FTP, FILE, RTSP and SFTP.EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
/* get the first 200 bytes */
curl_easy_setopt(curl, CURLOPT_RANGE, "0-199");
/* Perform the request */
curl_easy_perform(curl);
}
AVAILABILITY
FILE since 7.18.0, RTSP since 7.20.0RETURN VALUE
Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufficient heap space.SEE ALSO
CURLOPT_RESUME_FROM(3),May 17, 2022 | libcurl 7.84.0 |