From RAD Studio API Documentation
Jump to: navigation, search


function Delete(const AURL: string; const AResponseContent: TStream = nil; const AHeaders: TNetHeaders = nil): IHTTPResponse;


_di_IHTTPResponse __fastcall Delete(const System::UnicodeString AURL, System::Classes::TStream* const AResponseContent = (System::Classes::TStream*)(0x0), const System::DynamicArray<System::Net::Urlclient::TNameValuePair> AHeaders = System::DynamicArray<System::Net::Urlclient::TNameValuePair>());


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


Sends an HTTP request to the specified URL using the DELETE HTTP request method, waits for the server to send a response, and returns the HTTP response of the server.

You may specify a stream as value for the AResponseContent parameter to receive the response data on the specified stream as your HTTP client downloads the response data from the target server. Alternatively, you can wait for your HTTP client to download the whole response data, and obtain the response data as a stream from the ContentStream property of the response object that Delete returns.

Regardless of whether you receive the data as it comes or wait for the whole data to be available, you can handle the OnReceiveData event to track the progress of the download of the response data.

Use AHeaders to include custom HTTP request headers in your HTTP request.

Delete raises an ENetHTTPRequestException if the HTTP request reaches the maximum number of redirects.

See Also