System.Net.HttpClient.THTTPClient.Execute

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Execute(const ARequest: IHTTPRequest; const AContentStream: TStream = nil;
const AHeaders: TNetHeaders = nil): IHTTPResponse; overload;
function Execute(const ARequest: IURLRequest; const AContentStream: TStream = nil;
const AHeaders: TNetHeaders = nil): IURLResponse; overload; override;

C++

HIDESBASE _di_IHTTPResponse __fastcall Execute(const _di_IHTTPRequest ARequest, System::Classes::TStream* const AContentStream = (System::Classes::TStream*)(0x0), const System::Net::Urlclient::TNetHeaders AHeaders = System::DynamicArray<System::Net::Urlclient::TNameValuePair>())/* overload */;
virtual System::Net::Urlclient::_di_IURLResponse __fastcall Execute(const System::Net::Urlclient::_di_IURLRequest ARequest, System::Classes::TStream* const AContentStream = (System::Classes::TStream*)(0x0), const System::Net::Urlclient::TNetHeaders AHeaders = System::DynamicArray<System::Net::Urlclient::TNameValuePair>())/* overload */;
inline System::Net::Urlclient::_di_IURLResponse __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>()){ return System::Net::Urlclient::TURLClient::Execute(ARequestMethod, AURI, ASourceStream, AContentStream, AHeaders); }
inline System::Net::Urlclient::_di_IURLResponse __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>()){ return System::Net::Urlclient::TURLClient::Execute(ARequestMethod, AURIStr, ASourceStream, AContentStream, AHeaders); }

Properties

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

Description

Executes the given request associated with the HTTP client.

Execute receives as parameters:

  • ARequest, the client request to execute.
  • AContentStream, the stream to store the response data. AContentStream may not be provided. In that case, the response stream is internally created, and released when no needed. Otherwise, you should release it.
  • AHeaders, the headers to be added to the executed request.

Execute returns a platform-dependant interfaced response object. This IHTTPResponse is released automatically.

See Also