Breyta

Deila með


HttpClientJsonExtensions.PatchAsJsonAsync Method

Definition

Overloads

PatchAsJsonAsync<TValue>(HttpClient, Uri, TValue, JsonTypeInfo<TValue>, CancellationToken)

Sends a PATCH request to the specified Uri containing the value serialized as JSON in the request body.

PatchAsJsonAsync<TValue>(HttpClient, String, TValue, JsonTypeInfo<TValue>, CancellationToken)

Sends a PATCH request to the specified Uri containing the value serialized as JSON in the request body.

PatchAsJsonAsync<TValue>(HttpClient, Uri, TValue, JsonSerializerOptions, CancellationToken)

Sends a PATCH request to the specified Uri containing the value serialized as JSON in the request body.

PatchAsJsonAsync<TValue>(HttpClient, Uri, TValue, CancellationToken)

Sends a PATCH request to the specified Uri containing the value serialized as JSON in the request body.

PatchAsJsonAsync<TValue>(HttpClient, String, TValue, CancellationToken)

Sends a PATCH request to the specified Uri containing the value serialized as JSON in the request body.

PatchAsJsonAsync<TValue>(HttpClient, String, TValue, JsonSerializerOptions, CancellationToken)

Sends a PATCH request to the specified Uri containing the value serialized as JSON in the request body.

PatchAsJsonAsync<TValue>(HttpClient, Uri, TValue, JsonTypeInfo<TValue>, CancellationToken)

Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs

Sends a PATCH request to the specified Uri containing the value serialized as JSON in the request body.

public static System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsJsonAsync<TValue> (this System.Net.Http.HttpClient client, Uri? requestUri, TValue value, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo, System.Threading.CancellationToken cancellationToken = default);
static member PatchAsJsonAsync : System.Net.Http.HttpClient * Uri * 'Value * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
<Extension()>
Public Function PatchAsJsonAsync(Of TValue) (client As HttpClient, requestUri As Uri, value As TValue, jsonTypeInfo As JsonTypeInfo(Of TValue), Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpResponseMessage)

Type Parameters

TValue

The type of the value to serialize.

Parameters

client
HttpClient

The client used to send the request.

requestUri
Uri

The Uri the request is sent to.

value
TValue

The value to serialize.

jsonTypeInfo
JsonTypeInfo<TValue>

The JsonTypeInfo used to control the behavior during serialization.

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 client is null.

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

Applies to

PatchAsJsonAsync<TValue>(HttpClient, String, TValue, JsonTypeInfo<TValue>, CancellationToken)

Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs

Sends a PATCH request to the specified Uri containing the value serialized as JSON in the request body.

public static System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsJsonAsync<TValue> (this System.Net.Http.HttpClient client, string? requestUri, TValue value, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo, System.Threading.CancellationToken cancellationToken = default);
static member PatchAsJsonAsync : System.Net.Http.HttpClient * string * 'Value * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
<Extension()>
Public Function PatchAsJsonAsync(Of TValue) (client As HttpClient, requestUri As String, value As TValue, jsonTypeInfo As JsonTypeInfo(Of TValue), Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpResponseMessage)

Type Parameters

TValue

The type of the value to serialize.

Parameters

client
HttpClient

The client used to send the request.

requestUri
String

The Uri the request is sent to.

value
TValue

The value to serialize.

jsonTypeInfo
JsonTypeInfo<TValue>

The JsonTypeInfo used to control the behavior during serialization.

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 client is null.

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

Applies to

PatchAsJsonAsync<TValue>(HttpClient, Uri, TValue, JsonSerializerOptions, CancellationToken)

Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs

Sends a PATCH request to the specified Uri containing the value serialized as JSON in the request body.

public static System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsJsonAsync<TValue> (this System.Net.Http.HttpClient client, Uri? requestUri, TValue value, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
static member PatchAsJsonAsync : System.Net.Http.HttpClient * Uri * 'Value * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
<Extension()>
Public Function PatchAsJsonAsync(Of TValue) (client As HttpClient, requestUri As Uri, value As TValue, Optional options As JsonSerializerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpResponseMessage)

Type Parameters

TValue

The type of the value to serialize.

Parameters

client
HttpClient

The client used to send the request.

requestUri
Uri

The Uri the request is sent to.

value
TValue

The value to serialize.

options
JsonSerializerOptions

Options to control the behavior during serialization. The default options are those specified by Web.

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 client is null.

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

Applies to

PatchAsJsonAsync<TValue>(HttpClient, Uri, TValue, CancellationToken)

Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs

Sends a PATCH request to the specified Uri containing the value serialized as JSON in the request body.

public:
generic <typename TValue>
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ PatchAsJsonAsync(System::Net::Http::HttpClient ^ client, Uri ^ requestUri, TValue value, System::Threading::CancellationToken cancellationToken);
public static System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsJsonAsync<TValue> (this System.Net.Http.HttpClient client, Uri? requestUri, TValue value, System.Threading.CancellationToken cancellationToken);
static member PatchAsJsonAsync : System.Net.Http.HttpClient * Uri * 'Value * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
<Extension()>
Public Function PatchAsJsonAsync(Of TValue) (client As HttpClient, requestUri As Uri, value As TValue, cancellationToken As CancellationToken) As Task(Of HttpResponseMessage)

Type Parameters

TValue

The type of the value to serialize.

Parameters

client
HttpClient

The client used to send the request.

requestUri
Uri

The Uri the request is sent to.

value
TValue

The value to serialize.

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 client is null.

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

Applies to

PatchAsJsonAsync<TValue>(HttpClient, String, TValue, CancellationToken)

Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs

Sends a PATCH request to the specified Uri containing the value serialized as JSON in the request body.

public:
generic <typename TValue>
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<System::Net::Http::HttpResponseMessage ^> ^ PatchAsJsonAsync(System::Net::Http::HttpClient ^ client, System::String ^ requestUri, TValue value, System::Threading::CancellationToken cancellationToken);
public static System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsJsonAsync<TValue> (this System.Net.Http.HttpClient client, string? requestUri, TValue value, System.Threading.CancellationToken cancellationToken);
static member PatchAsJsonAsync : System.Net.Http.HttpClient * string * 'Value * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
<Extension()>
Public Function PatchAsJsonAsync(Of TValue) (client As HttpClient, requestUri As String, value As TValue, cancellationToken As CancellationToken) As Task(Of HttpResponseMessage)

Type Parameters

TValue

The type of the value to serialize.

Parameters

client
HttpClient

The client used to send the request.

requestUri
String

The Uri the request is sent to.

value
TValue

The value to serialize.

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 client is null.

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

Applies to

PatchAsJsonAsync<TValue>(HttpClient, String, TValue, JsonSerializerOptions, CancellationToken)

Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs

Sends a PATCH request to the specified Uri containing the value serialized as JSON in the request body.

public static System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PatchAsJsonAsync<TValue> (this System.Net.Http.HttpClient client, string? requestUri, TValue value, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
static member PatchAsJsonAsync : System.Net.Http.HttpClient * string * 'Value * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
<Extension()>
Public Function PatchAsJsonAsync(Of TValue) (client As HttpClient, requestUri As String, value As TValue, Optional options As JsonSerializerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpResponseMessage)

Type Parameters

TValue

The type of the value to serialize.

Parameters

client
HttpClient

The client used to send the request.

requestUri
String

The Uri the request is sent to.

value
TValue

The value to serialize.

options
JsonSerializerOptions

Options to control the behavior during serialization. The default options are those specified by Web.

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 client is null.

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

Applies to