System.Net.URLClient.TURLResponse.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: IURLRequest; const AContentStream: TStream); overload;
constructor Create(const AContext: TObject; const ARequest: IURLRequest; const AContentStream: TStream); overload;

C++

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

Properties

Type Visibility Source Unit Parent
constructor
protected
public
System.Net.URLClient.pas
System.Net.URLClient.hpp
System.Net.URLClient TURLResponse

Description

Base constructor that you should call from the constructors of TURLResponse subclasses.

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 TURLResponse calls once the incoming URL response has been processed.
  • AAsyncCallbackEvent (optional) is an event handler that the subclass of TURLResponse 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, TURLResponse uses a memory stream.