संपादित करें

इसके माध्यम से साझा किया गया


HttpClient.PatchAsync Method

Definition

Overloads

PatchAsync(String, HttpContent)

Sends a PATCH request to a Uri designated as a string as an asynchronous operation.

PatchAsync(Uri, HttpContent)

Sends a PATCH request as an asynchronous operation.

PatchAsync(String, HttpContent, CancellationToken)

Sends a PATCH request with a cancellation token to a Uri represented as a string as an asynchronous operation.

PatchAsync(Uri, HttpContent, CancellationToken)

Sends a PATCH request with a cancellation token as an asynchronous operation.

PatchAsync(String, HttpContent)

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

Sends a PATCH request to a Uri designated as a string as an asynchronous operation.

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)

Parameters

requestUri
String

The Uri the request is sent to.

content
HttpContent

The HTTP request content sent to the server.

Returns

The task object representing the asynchronous operation.

Exceptions

The provided request URI is not valid relative or absolute URI.

Remarks

This operation will not block. The returned Task<TResult> object will complete after the whole response (including content) is read.

Applies to

PatchAsync(Uri, HttpContent)

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

Sends a PATCH request as an asynchronous operation.

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)

Parameters

requestUri
Uri

The Uri the request is sent to.

content
HttpContent

The HTTP request content sent to the server.

Returns

The task object representing the asynchronous operation.

Remarks

This operation will not block. The returned Task<TResult> object will complete after the whole response (including content) is read.

Applies to

PatchAsync(String, HttpContent, CancellationToken)

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

Sends a PATCH request with a cancellation token to a Uri represented as a string as an asynchronous operation.

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)

Parameters

requestUri
String

The Uri the request is sent to.

content
HttpContent

The HTTP request content sent to the server.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

The task object representing the asynchronous operation.

Exceptions

The provided request URI is not valid relative or absolute URI.

The cancellation token was canceled. This exception is stored into the returned task.

Remarks

This operation will not block. The returned Task<TResult> object will complete after the whole response (including content) is read.

Applies to

PatchAsync(Uri, HttpContent, CancellationToken)

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

Sends a PATCH request with a cancellation token as an asynchronous operation.

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)

Parameters

requestUri
Uri

The Uri the request is sent to.

content
HttpContent

The HTTP request content sent to the server.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

The task object representing the asynchronous operation.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Remarks

This operation will not block. The returned Task<TResult> object will complete after the whole response (including content) is read.

Applies to