System.Net.HttpClient.THTTPClient.DoGetResponseInstance

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function DoGetResponseInstance(const AContext: TObject; const AProc: TProc; const AsyncCallback: TAsyncCallback;  const AsyncCallbackEvent: TAsyncCallbackEvent; const ARequest: IHTTPRequest; const AContentStream: TStream): IHTTPResponse; reintroduce; virtual; abstract;

C++

HIDESBASE virtual _di_IHTTPResponse __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_IHTTPRequest ARequest, System::Classes::TStream* const AContentStream) = 0 ;

Properties

Type Visibility Source Unit Parent
function protected
System.Net.HTTPClient.pas
System.Net.HTTPClient.hpp
System.Net.HttpClient THTTPClient

Description

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.
  • AProc (optional) is a procedure to process the incoming HTTP response.
  • AAsyncCallback is a callback that the resulting HTTP response object calls once the incoming HTTP response has been processed.
  • AAsyncCallbackEvent is an event handler that the resulting HTTP response object calls once the incoming HTTP response has been processed.
    Note: AAsyncCallbackEvent is only called if AAsyncCallback is not defined.
  • ARequest is the source HTTP request.
  • AContentStream is the stream that receives the HTTP response. If no stream object is specified, the resulting HTTP response object uses a memory stream.

See Also