HttpClientJsonExtensions.PatchAsJsonAsync 方法

定义

重载

名称 说明
PatchAsJsonAsync<TValue>(HttpClient, Uri, TValue, JsonTypeInfo<TValue>, CancellationToken)

将 PATCH 请求发送到在请求正文中包含序列化为 JSON 的 value 指定 URI。

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

将 PATCH 请求发送到在请求正文中包含序列化为 JSON 的 value 指定 URI。

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

将 PATCH 请求发送到在请求正文中包含序列化为 JSON 的 value 指定 URI。

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

将 PATCH 请求发送到在请求正文中包含序列化为 JSON 的 value 指定 URI。

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

将 PATCH 请求发送到在请求正文中包含序列化为 JSON 的 value 指定 URI。

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

将 PATCH 请求发送到在请求正文中包含序列化为 JSON 的 value 指定 URI。

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
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs

将 PATCH 请求发送到在请求正文中包含序列化为 JSON 的 value 指定 URI。

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)

类型参数

TValue

要序列化的值的类型。

参数

client
HttpClient

用于发送请求的客户端。

requestUri
Uri

请求发送到的 URI。

value
TValue

要序列化的值。

jsonTypeInfo
JsonTypeInfo<TValue>

用于在序列化期间控制行为的 JsonTypeInfo。

cancellationToken
CancellationToken

其他对象或线程可以使用的取消令牌来接收取消通知。

返回

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

例外

clientnull

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

适用于

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
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs

将 PATCH 请求发送到在请求正文中包含序列化为 JSON 的 value 指定 URI。

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)

类型参数

TValue

要序列化的值的类型。

参数

client
HttpClient

用于发送请求的客户端。

requestUri
String

请求发送到的 URI。

value
TValue

要序列化的值。

jsonTypeInfo
JsonTypeInfo<TValue>

用于在序列化期间控制行为的 JsonTypeInfo。

cancellationToken
CancellationToken

其他对象或线程可以使用的取消令牌来接收取消通知。

返回

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

例外

clientnull

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

适用于

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
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs

将 PATCH 请求发送到在请求正文中包含序列化为 JSON 的 value 指定 URI。

[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
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);
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);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member PatchAsJsonAsync : System.Net.Http.HttpClient * Uri * 'Value * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
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)

类型参数

TValue

要序列化的值的类型。

参数

client
HttpClient

用于发送请求的客户端。

requestUri
Uri

请求发送到的 URI。

value
TValue

要序列化的值。

options
JsonSerializerOptions

用于控制序列化期间行为的选项。 默认选项由 Web.

cancellationToken
CancellationToken

其他对象或线程可以使用的取消令牌来接收取消通知。

返回

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

属性

例外

clientnull

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

适用于

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
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs

将 PATCH 请求发送到在请求正文中包含序列化为 JSON 的 value 指定 URI。

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);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
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);
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);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member PatchAsJsonAsync : System.Net.Http.HttpClient * Uri * 'Value * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
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)

类型参数

TValue

要序列化的值的类型。

参数

client
HttpClient

用于发送请求的客户端。

requestUri
Uri

请求发送到的 URI。

value
TValue

要序列化的值。

cancellationToken
CancellationToken

其他对象或线程可以使用的取消令牌来接收取消通知。

返回

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

属性

例外

clientnull

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

适用于

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
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs

将 PATCH 请求发送到在请求正文中包含序列化为 JSON 的 value 指定 URI。

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);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
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);
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);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member PatchAsJsonAsync : System.Net.Http.HttpClient * string * 'Value * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
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)

类型参数

TValue

要序列化的值的类型。

参数

client
HttpClient

用于发送请求的客户端。

requestUri
String

请求发送到的 URI。

value
TValue

要序列化的值。

cancellationToken
CancellationToken

其他对象或线程可以使用的取消令牌来接收取消通知。

返回

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

属性

例外

clientnull

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

适用于

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
Source:
HttpClientJsonExtensions.Patch.cs
Source:
HttpClientJsonExtensions.Patch.cs

将 PATCH 请求发送到在请求正文中包含序列化为 JSON 的 value 指定 URI。

[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
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);
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);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member PatchAsJsonAsync : System.Net.Http.HttpClient * string * 'Value * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
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)

类型参数

TValue

要序列化的值的类型。

参数

client
HttpClient

用于发送请求的客户端。

requestUri
String

请求发送到的 URI。

value
TValue

要序列化的值。

options
JsonSerializerOptions

用于控制序列化期间行为的选项。 默认选项由 Web.

cancellationToken
CancellationToken

其他对象或线程可以使用的取消令牌来接收取消通知。

返回

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

属性

例外

clientnull

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

适用于