Sortix volatile manual
This manual documents Sortix volatile, a development build that has not been officially released. You can instead view this document in the latest official manual.
CURLOPT_RANGE(3) | Library Functions Manual | 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 pointer 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
This functionality affects file, ftp, http, rtsp and sftpEXAMPLE
int main(void)
{
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);
}
}
HISTORY
FILE since 7.18.0, RTSP since 7.20.0AVAILABILITY
Added in curl 7.1RETURN VALUE
Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufficient heap space.SEE ALSO
CURLOPT_LOW_SPEED_LIMIT(3), CURLOPT_MAXFILESIZE_LARGE(3), CURLOPT_MAX_RECV_SPEED_LARGE(3), CURLOPT_RESUME_FROM(3)2024-11-23 | libcurl |