System.Net.HttpClient.THTTPClient.DoExecuteAsync
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::TAsyncCallbackEvent AsyncCallbackEvent, const System::UnicodeString ARequestMethod, const System::Net::Urlclient::TURI &AURI, System::Classes::TStream* const ASourceStream, System::Classes::TStream* const AContentStream, const System::Net::Urlclient::TNetHeaders 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:
AsyncCallbackis a callback procedure to be called when a response is received or the request fails.AsyncCallbackEventis an event handler to be called when a response is received or the request fails ifAsyncCallbackis nil.ARequestMethodis a string that defines the request method to use. Possible request methods depend on the protocol.AURIis a URI that identifies the location of the resource that you request.ASourceStreamis a stream of data to provide in the request.AContentStreamis a stream to hold the data included in the response.AHeadersis a list of headers to include in the request.AOwnsSourceStreamdetermines whetherASourceStreamshould be freed when the request is submitted (True) or not (False).
For more information, see InternalExecuteAsync.