System.Net.HttpClient.THTTPRequest.OnReceiveData

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnReceiveData: TReceiveDataEvent read GetReceiveDataEvent write SetReceiveDataEvent;

C++

__property TReceiveDataEvent OnReceiveData = {read=GetReceiveDataEvent, write=SetReceiveDataEvent};

Properties

Type Visibility Source Unit Parent
event public
System.Net.HttpClient.pas
System.Net.HTTPClient.hpp
System.Net.HttpClient THTTPRequest

Description

Occurs one or more times while your request receives response data, and it indicates the current progress of the response download.

The event handler of OnReceiveData receives the following parameters:

  • Sender is your HTTP request.
  • 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 an incoming variable parameter the event handle can set to True to abort data reception.

Instead of defining an event handler for this event, you might define a callback method using the ReceiveDataCallback property.

See Also