System.Net.HttpClientComponent.TNetHTTPClient Events

From RAD Studio API Documentation
Jump to: navigation, search

OnAuthEventpublishedEvent fired when a user name is needed to be authenticated to the proxy.
OnNeedClientCertificatepublishedEvent fired when a client certificate is needed.
OnReceiveDatapublishedOccurs one or more times while your HTTP client receives response data for a request, and it indicates the current progress of the response download.
OnRequestCompletedpublishedOnRequestCompleted is a event handler fired when a request finishes.
OnRequestErrorpublishedOnRequestError is a event handler fired when a request has an error.
OnRequestExceptionpublishedOnRequestException is called when a request execution generates 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 an exception is raised.
OnValidateServerCertificatepublishedEvent fired when checking the validity of a server certificate.