System.Net.HttpClientComponent.TNetHTTPClient.GetRange

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetRange(const AURL: string; AStart: Int64; AnEnd: Int64 = -1; const AResponseContent: TStream = nil;  const AHeaders: TNetHeaders = nil): IHTTPResponse;

C++

System::Net::Httpclient::_di_IHTTPResponse __fastcall GetRange(const System::UnicodeString AURL, __int64 AStart, __int64 AnEnd = -1LL, System::Classes::TStream* const AResponseContent = (System::Classes::TStream*)(0x0), const System::DynamicArray<System::Net::Urlclient::TNameValuePair> AHeaders = System::DynamicArray<System::Net::Urlclient::TNameValuePair>());

Properties

Type Visibility Source Unit Parent
function public
System.Net.HTTPClientComponent.pas
System.Net.HTTPClientComponent.hpp
System.Net.HttpClientComponent TNetHTTPClient

Description

The GetRange method sends a GET command to the AURL with the Range header added to AHeaders.

The Range header specifies the fragment of the original data that you want to receive in the AResponseContent from the server in the response. The Range header value includes the AStart byte of the fragment and the AnEnd byte of the fragment. AStart and AnEnd values are only included in the Range header if they are higher than -1.

If you want to resume a download, you can use GetRange to ask the server to send information from the last byte that was received specifying AStart and AnEnd.

See Also