From RAD Studio API Documentation
Jump to: navigation, search


function DoGetResponseInstance(const AContext: TObject; const AProc: TProc; const AsyncCallback: TAsyncCallback;
const AsyncCallbackEvent: TAsyncCallbackEvent; const ARequest: IURLRequest; const AContentStream: TStream): IAsyncResult; virtual;


virtual System::Types::_di_IAsyncResult __fastcall DoGetResponseInstance(System::TObject* const AContext, const System::Sysutils::_di_TProc AProc, const System::Classes::_di_TAsyncCallback AsyncCallback, const System::Classes::TAsyncProcedureEvent AsyncCallbackEvent, const _di_IURLRequest ARequest, System::Classes::TStream* const AContentStream);


Type Visibility Source Unit Parent
function protected
System.Net.URLClient TURLClient


Note: Subclasses of TURLClient must provide their own implementation of DoGetResponseInstance, which should work as described below. When you call TURLClient.DoGetResponseInstance, it raises an ENetURIClientException exception.

Returns a request instance.

DoGetResponseInstance receives the following parameters:

  • AContext is an arbitrary object to associate to this response as context. You may later access this context using the AsyncContext property of the IAsyncResult interface.
  • AAsyncCallback is a callback that the resulting response object calls once the incoming URL response has been processed.
  • AAsyncCallbackEvent is an event handler that the resulting response object calls once the incoming URL response has been processed.
    Note: AAsyncCallbackEvent is only called if AAsyncCallback is not defined.
  • ARequest is the source URL request.
  • AContentStream is the stream that receives the URL response. If no stream object is specified, the resulting response object uses a memory stream.

See Also