System.Net.HttpClientComponent.TNetHTTPClient.Execute
Delphi
function Execute(const ARequest: IHTTPRequest; const AContentStream: TStream = nil): IHTTPResponse; overload;
function Execute(const ARequestMethod: string; const AURI: TURI; const ASourceStream: TStream = nil;
const AContentStream: TStream = nil; const AHeaders: TNetHeaders = nil): IHTTPResponse; overload;
function Execute(const ARequestMethod: string; const AURIStr: string; const ASourceStream: TStream = nil;
const AContentStream: TStream = nil; const AHeaders: TNetHeaders = nil): IHTTPResponse; overload; inline;
C++
System::Net::Httpclient::_di_IHTTPResponse __fastcall Execute(const System::Net::Httpclient::_di_IHTTPRequest ARequest, System::Classes::TStream* const AContentStream = (System::Classes::TStream*)(0x0))/* overload */;
System::Net::Httpclient::_di_IHTTPResponse __fastcall Execute(const System::UnicodeString ARequestMethod, const System::Net::Urlclient::TURI &AURI, System::Classes::TStream* const ASourceStream = (System::Classes::TStream*)(0x0), System::Classes::TStream* const AContentStream = (System::Classes::TStream*)(0x0), const System::Net::Urlclient::TNetHeaders AHeaders = System::DynamicArray<System::Net::Urlclient::TNameValuePair>())/* overload */;
System::Net::Httpclient::_di_IHTTPResponse __fastcall Execute(const System::UnicodeString ARequestMethod, const System::UnicodeString AURIStr, System::Classes::TStream* const ASourceStream = (System::Classes::TStream*)(0x0), System::Classes::TStream* const AContentStream = (System::Classes::TStream*)(0x0), const System::Net::Urlclient::TNetHeaders AHeaders = System::DynamicArray<System::Net::Urlclient::TNameValuePair>())/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Net.HTTPClientComponent.pas System.Net.HTTPClientComponent.hpp |
System.Net.HttpClientComponent | TNetHTTPClient |
Description
Executes a given request.
Use the Execute method to execute ARequest
.
Execute returns the platform-dependant response object associated to the given request. The return type is the interfaced object IHTTPResponse that is released automatically.
Execute is an overloaded method, check the table below to see a description of the parameters used in the different overloaded methods:
Parameter | Description |
---|---|
ARequest
|
The request to be executed. |
AContentStream
|
The stream to store the response data. When the stream is provided, you are responsible to release it. When no stream is provided, one is created internally and released when not needed. |
ARequestMethod
|
The request method to be executed. |
AURI
|
The URI that contains the information for the request that is going to be executed. |
AURIStr
|
The URI string that contains the information for the request that is going to be executed. |
ASourceStream
|
The stream to provide the request data. |
AHeaders
|
Additional headers to pass to the request that is going to be executed. |