System.Net.HttpClientComponent.TNetHTTPClient.MergeAlternative
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 | TNetHTTPClient |
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.