System.Net.HttpClientComponent.TNetHTTPRequest.MergeAlternative

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function MergeAlternative(const AURL: string; const ASource: TStream; const AHeaders: TNetHeaders = nil): IHTTPResponse;

C++

System::Net::Httpclient::_di_IHTTPResponse __fastcall MergeAlternative(const System::UnicodeString AURL, System::Classes::TStream* const ASource, const System::DynamicArray<System::Net::Urlclient::TNameValuePair> AHeaders = System::DynamicArray<System::Net::Urlclient::TNameValuePair>());

Properties

Type Visibility Source Unit Parent
function public
System.Net.HTTPClientComponent.pas
System.Net.HTTPClientComponent.hpp
System.Net.HttpClientComponent TNetHTTPRequest

Description

Sends an HTTP request to the specified URL with the specified data (ASource) using the MERGE HTTP request method masked as a PUT request method, waits for the server to send a response, and returns the HTTP response of the server.

Specifically, the HTTP request that MergeAlternative sends uses PUT as HTTP request method and includes the following HTTP request headers to indicate that your request is actually a merge request:

  • X-Method-Override: PATCH
  • PatchType: MERGE

Use MergeAlternative if your HTTP request must go through a proxy HTTP server that may not support the MERGE HTTP request method, otherwise you can use Merge instead.

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

MergeAlternative raises an ENetHTTPRequestException if the HTTP request reaches the maximum number of redirects of the HTTP client of your request.

See Also