System.Net.HttpClient.THTTPClient.DoExecuteAsync

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function DoExecuteAsync(const AsyncCallback: TAsyncCallback; const AsyncCallbackEvent: TAsyncCallbackEvent;  const ARequestMethod: string; const AURI: TURI; const ASourceStream, AContentStream: TStream; const AHeaders: TNetHeaders; AOwnsSourceStream: Boolean): IAsyncResult; override;

C++

virtual System::Types::_di_IAsyncResult __fastcall DoExecuteAsync(const System::Classes::_di_TAsyncCallback AsyncCallback, const System::Classes::TAsyncProcedureEvent AsyncCallbackEvent, const System::UnicodeString ARequestMethod, const System::Net::Urlclient::TURI &AURI, System::Classes::TStream* const ASourceStream, System::Classes::TStream* const AContentStream, const System::DynamicArray<System::Net::Urlclient::TNameValuePair> AHeaders, bool AOwnsSourceStream);

Properties

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

Description

Builds a request object based on the specified request method, URI and source stream, and calls InternalExecuteAsync to start an asynchronous HTTP request.

When you call DoExecuteAsync, you must provide the data required to perform your HTTP request:

  • AsyncCallback is a callback procedure to be called when a response is received or the request fails.
  • AsyncCallbackEvent is an event handler to be called when a response is received or the request fails if AsyncCallback is nil.
  • ARequestMethod is a string that defines the request method to use. Possible request methods depend on the protocol.
  • AURI is a URI that identifies the location of the resource that you request.
  • ASourceStream is a stream of data to provide in the request.
  • AContentStream is a stream to hold the data included in the response.
  • AHeaders is a list of headers to include in the request.
  • AOwnsSourceStream determines whether ASourceStream should be freed when the request is submitted (True) or not (False).

For more information, see InternalExecuteAsync.

See Also