System.Net.HttpClient.THTTPResponse.Create

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

constructor Create(const AContext: TObject; const AProc: TProc;  const AAsyncCallback: TAsyncCallback; const AAsyncCallbackEvent: TAsyncCallbackEvent; const ARequest: IHTTPRequest; const AContentStream: TStream); overload;

C++

__fastcall THTTPResponse(System::TObject* const AContext, const System::Sysutils::_di_TProc AProc, const System::Classes::_di_TAsyncCallback AAsyncCallback, const System::Classes::TAsyncProcedureEvent AAsyncCallbackEvent, const _di_IHTTPRequest ARequest, System::Classes::TStream* const AContentStream)/* overload */;
/* TURLResponse.Create */ inline __fastcall THTTPResponse(System::TObject* const AContext, const System::Sysutils::_di_TProc AProc, const System::Classes::_di_TAsyncCallback AAsyncCallback, const System::Classes::TAsyncProcedureEvent AAsyncCallbackEvent, const System::Net::Urlclient::_di_IURLRequest ARequest, System::Classes::TStream* const AContentStream)/* overload */ : System::Net::Urlclient::TURLResponse(AContext, AProc, AAsyncCallback, AAsyncCallbackEvent, ARequest, AContentStream) { }
/* TURLResponse.Create */ inline __fastcall THTTPResponse(System::TObject* const AContext, const System::Net::Urlclient::_di_IURLRequest ARequest, System::Classes::TStream* const AContentStream)/* overload */ : System::Net::Urlclient::TURLResponse(AContext, ARequest, AContentStream) { }
/* TBaseAsyncResult.Create */ inline __fastcall THTTPResponse(System::TObject* const AContext)/* overload */ : System::Net::Urlclient::TURLResponse(AContext) { }
/* TBaseAsyncResult.Create */ inline __fastcall THTTPResponse()/* overload */ : System::Net::Urlclient::TURLResponse() { }

Properties

Type Visibility Source Unit Parent
constructor
protected
public
System.Net.HttpClient.pas
System.Net.HTTPClient.hpp
System.Net.HttpClient THTTPResponse

Description

Creates an instance of THTTPResponse.

Create 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 URL response.
  • AAsyncCallback (optional) is a callback that the subclass of THTTPResponse calls once the incoming URL response has been processed.
  • AAsyncCallbackEvent (optional) is an event handler that the subclass of THTTPResponse calls once the incoming URL response has been processed.
    Note: AAsyncCallbackEvent is only called if AAsyncCallback is not defined.
  • AContentStream is the stream that receives the URL response. If no stream object is specified, THTTPResponse uses a memory stream.