System.Net.HttpClient.THTTPRequest.DoReceiveDataProgress
Delphi
procedure DoReceiveDataProgress(AStatusCode: Integer; AContentLength: Int64; AReadCount: Int64; var AAbort: Boolean);
C++
void __fastcall DoReceiveDataProgress(int AStatusCode, __int64 AContentLength, __int64 AReadCount, bool &AAbort);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | System.Net.HttpClient.pas System.Net.HTTPClient.hpp |
System.Net.HttpClient | THTTPRequest |
Description
Dispatcher of the OnReceiveData event and caller of the ReceiveDataCallback callback.
The HTTP request calls DoReceiveDataProgress one or more times during the download of the response data.
DoReceiveDataProgress receives the following parameters:
AStatusCode
is the HTTP status code of the response.AContentLength
is the expected length of the response, in number of bytes.AReadCount
is the length of the response data that has been downloaded so far, in number of bytes.Abort
is a Boolean parameter that you can set toTrue
in order to cancel the download of the response data.
If AStatusCode
is that of a successful HTTP response (lower than 300), DoReceiveDataProgress calls both the handler of the OnReceiveData event and the ReceiveDataCallback callback method. Otherwise, DoReceiveDataProgress does nothing.