System.Net.HttpClientComponent.TNetHTTPRequest.PatchAlternative
Delphi
function PatchAlternative(const AURL: string; const ASource: TStream = nil; const AResponseContent: TStream = nil;
const AHeaders: TNetHeaders = nil): IHTTPResponse;
C++
System::Net::Httpclient::_di_IHTTPResponse __fastcall PatchAlternative(const System::UnicodeString AURL, System::Classes::TStream* const ASource = (System::Classes::TStream*)(0x0), System::Classes::TStream* const AResponseContent = (System::Classes::TStream*)(0x0), const System::Net::Urlclient::TNetHeaders 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 PATCH
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 PatchAlternative sends uses PUT
as HTTP request method and includes the following HTTP request header to indicate that your request is actually a patch request:
X-Method-Override: PATCH
Use PatchAlternative if your HTTP request must go through a proxy HTTP server that may not support the PATCH
HTTP request method, otherwise you can use Patch instead.
Use AHeaders
to include custom HTTP request headers in your HTTP request.
PatchAlternative raises an ENetHTTPRequestException if the HTTP request reaches the maximum number of redirects of the HTTP client of your request.