HttpClient.PatchAsync 方法

定義

多載

PatchAsync(String, HttpContent)

以非同步作業的方式,將 PATCH 要求傳送至指定為字串的 URI。

PatchAsync(Uri, HttpContent)

以非同步作業的方式傳送 PATCH 要求。

PatchAsync(String, HttpContent, CancellationToken)

以非同步作業的方式,將 PATCH 要求和取消權杖傳送至以字串表示的 URI。

PatchAsync(Uri, HttpContent, CancellationToken)

以非同步作業的方式,傳送 PATCH 要求和取消語彙基元。

PatchAsync(String, HttpContent)

以非同步作業的方式,將 PATCH 要求傳送至指定為字串的 URI。

public:
 System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ PatchAsync(System::String ^ requestUri, System::Net::Http::HttpContent ^ content);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync (string? requestUri, System.Net.Http.HttpContent content);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync (string? requestUri, System.Net.Http.HttpContent? content);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync (string requestUri, System.Net.Http.HttpContent content);
member this.PatchAsync : string * System.Net.Http.HttpContent -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function PatchAsync (requestUri As String, content As HttpContent) As Task(Of HttpResponseMessage)

參數

requestUri
String

傳送要求的目標 URI。

content
HttpContent

傳送至伺服器的 HTTP 要求內容。

傳回

Task<HttpResponseMessage>

工作物件,表示非同步作業。

備註

這項作業不會封鎖。 傳回的 Task<TResult> 物件會在讀取完整的回應 (包括內容) 之後完成。

適用於

PatchAsync(Uri, HttpContent)

以非同步作業的方式傳送 PATCH 要求。

public:
 System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ PatchAsync(Uri ^ requestUri, System::Net::Http::HttpContent ^ content);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync (Uri? requestUri, System.Net.Http.HttpContent content);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync (Uri? requestUri, System.Net.Http.HttpContent? content);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync (Uri requestUri, System.Net.Http.HttpContent content);
member this.PatchAsync : Uri * System.Net.Http.HttpContent -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function PatchAsync (requestUri As Uri, content As HttpContent) As Task(Of HttpResponseMessage)

參數

requestUri
Uri

傳送要求的目標 URI。

content
HttpContent

傳送至伺服器的 HTTP 要求內容。

傳回

Task<HttpResponseMessage>

工作物件,表示非同步作業。

備註

這項作業不會封鎖。 傳回的 Task<TResult> 物件會在讀取完整的回應 (包括內容) 之後完成。

適用於

PatchAsync(String, HttpContent, CancellationToken)

以非同步作業的方式,將 PATCH 要求和取消權杖傳送至以字串表示的 URI。

public:
 System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ PatchAsync(System::String ^ requestUri, System::Net::Http::HttpContent ^ content, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync (string? requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync (string? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync (string requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken);
member this.PatchAsync : string * System.Net.Http.HttpContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function PatchAsync (requestUri As String, content As HttpContent, cancellationToken As CancellationToken) As Task(Of HttpResponseMessage)

參數

requestUri
String

傳送要求的目標 URI。

content
HttpContent

傳送至伺服器的 HTTP 要求內容。

cancellationToken
CancellationToken

取消語彙基元,可由其他物件或執行緒用來接收取消通知。

傳回

Task<HttpResponseMessage>

工作物件,表示非同步作業。

備註

這項作業不會封鎖。 傳回的 Task<TResult> 物件會在讀取完整的回應 (包括內容) 之後完成。

適用於

PatchAsync(Uri, HttpContent, CancellationToken)

以非同步作業的方式,傳送 PATCH 要求和取消語彙基元。

public:
 System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ PatchAsync(Uri ^ requestUri, System::Net::Http::HttpContent ^ content, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync (Uri? requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync (Uri? requestUri, System.Net.Http.HttpContent? content, System.Threading.CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsync (Uri requestUri, System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken);
member this.PatchAsync : Uri * System.Net.Http.HttpContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
Public Function PatchAsync (requestUri As Uri, content As HttpContent, cancellationToken As CancellationToken) As Task(Of HttpResponseMessage)

參數

requestUri
Uri

傳送要求的目標 URI。

content
HttpContent

傳送至伺服器的 HTTP 要求內容。

cancellationToken
CancellationToken

取消語彙基元,可由其他物件或執行緒用來接收取消通知。

傳回

Task<HttpResponseMessage>

工作物件,表示非同步作業。

備註

這項作業不會封鎖。 傳回的 Task<TResult> 物件會在讀取完整的回應 (包括內容) 之後完成。

適用於