System.Net.HttpClientComponent.TNetHTTPRequest Events

From RAD Studio API Documentation
Jump to: navigation, search

OnReceiveDatapublishedOccurs one or more times while your request receives response data, and it indicates the current progress of the response download.
OnRequestCompletedpublishedEvent fired when a request finishes.
OnRequestErrorpublishedEvent fired when a request has an error.
OnRequestExceptionpublishedOnRequestException is called when a request execution raises an exception.

OnRequestException is a better alternative than the OnRequestError event because as an argument it receives an exception object.

When SynchronizeEvents is True, the OnRequestException is called in the context of the main thread; otherwise, it is called in the context of the calling thread.

When OnRequestException is not assigned, then the TNetHTTPClient.OnRequestException is called. When both event handlers are not assigned, then an exception is raised.