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)

Source:
HttpClient.cs
Source:
HttpClient.cs
Source:
HttpClient.cs

以异步操作方式将 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 请求内容。

返回

表示异步操作的任务对象。

例外

提供的请求 URI 不是有效的相对 URI 或绝对 URI。

注解

此操作不会阻止。 返回的对象 Task<TResult> 将在读取整个响应 (包括内容) 后完成。

适用于

PatchAsync(Uri, HttpContent)

Source:
HttpClient.cs
Source:
HttpClient.cs
Source:
HttpClient.cs

以异步操作方式发送 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<TResult> 将在读取整个响应 (包括内容) 后完成。

适用于

PatchAsync(String, HttpContent, CancellationToken)

Source:
HttpClient.cs
Source:
HttpClient.cs
Source:
HttpClient.cs

以异步操作方式将带有取消令牌的 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

可由其他对象或线程用以接收取消通知的取消标记。

返回

表示异步操作的任务对象。

例外

提供的请求 URI 不是有效的相对 URI 或绝对 URI。

取消令牌已取消。 此异常存储在返回的任务中。

注解

此操作不会阻止。 返回的对象 Task<TResult> 将在读取整个响应 (包括内容) 后完成。

适用于

PatchAsync(Uri, HttpContent, CancellationToken)

Source:
HttpClient.cs
Source:
HttpClient.cs
Source:
HttpClient.cs

以异步操作方式发送带有取消令牌的 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<TResult> 将在读取整个响应 (包括内容) 后完成。

适用于