语言

HttpClientJsonExtensions.DeleteFromJsonAsync 方法

定义

重载

名称 说明
DeleteFromJsonAsync(HttpClient, String, Type, CancellationToken)

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

DeleteFromJsonAsync(HttpClient, Uri, Type, CancellationToken)

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

DeleteFromJsonAsync(HttpClient, String, Type, JsonSerializerOptions, CancellationToken)

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

DeleteFromJsonAsync(HttpClient, String, Type, JsonSerializerContext, CancellationToken)

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

DeleteFromJsonAsync(HttpClient, Uri, Type, JsonSerializerOptions, CancellationToken)

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

DeleteFromJsonAsync(HttpClient, Uri, Type, JsonSerializerContext, CancellationToken)

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

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

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

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

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

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

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

DeleteFromJsonAsync<TValue>(HttpClient, Uri, CancellationToken)

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

DeleteFromJsonAsync<TValue>(HttpClient, String, CancellationToken)

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

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

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

DeleteFromJsonAsync(HttpClient, String, Type, CancellationToken)

Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

[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<object?> DeleteFromJsonAsync(this System.Net.Http.HttpClient client, string? requestUri, Type type, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<object?> DeleteFromJsonAsync(this System.Net.Http.HttpClient client, string? requestUri, Type type, 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 DeleteFromJsonAsync : System.Net.Http.HttpClient * string * Type * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
static member DeleteFromJsonAsync : System.Net.Http.HttpClient * string * Type * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
<Extension()>
Public Function DeleteFromJsonAsync (client As HttpClient, requestUri As String, type As Type, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

参数

client
HttpClient

用于发送请求的客户端。

requestUri
String

请求发送到的 URI。

type
Type

要反序列化到和返回的对象的类型。

cancellationToken
CancellationToken

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

返回

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

属性

例外

client 是 null。

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

适用于

DeleteFromJsonAsync(HttpClient, Uri, Type, CancellationToken)

Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

[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<object?> DeleteFromJsonAsync(this System.Net.Http.HttpClient client, Uri? requestUri, Type type, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<object?> DeleteFromJsonAsync(this System.Net.Http.HttpClient client, Uri? requestUri, Type type, 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 DeleteFromJsonAsync : System.Net.Http.HttpClient * Uri * Type * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
static member DeleteFromJsonAsync : System.Net.Http.HttpClient * Uri * Type * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
<Extension()>
Public Function DeleteFromJsonAsync (client As HttpClient, requestUri As Uri, type As Type, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

参数

client
HttpClient

用于发送请求的客户端。

requestUri
Uri

请求发送到的 URI。

type
Type

要反序列化到和返回的对象的类型。

cancellationToken
CancellationToken

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

返回

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

属性

例外

client 是 null。

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

适用于

DeleteFromJsonAsync(HttpClient, String, Type, JsonSerializerOptions, CancellationToken)

Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

[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<object?> DeleteFromJsonAsync(this System.Net.Http.HttpClient client, string? requestUri, Type type, System.Text.Json.JsonSerializerOptions? options, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<object?> DeleteFromJsonAsync(this System.Net.Http.HttpClient client, string? requestUri, Type type, System.Text.Json.JsonSerializerOptions? options, 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 DeleteFromJsonAsync : System.Net.Http.HttpClient * string * Type * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
static member DeleteFromJsonAsync : System.Net.Http.HttpClient * string * Type * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
<Extension()>
Public Function DeleteFromJsonAsync (client As HttpClient, requestUri As String, type As Type, options As JsonSerializerOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

参数

client
HttpClient

用于发送请求的客户端。

requestUri
String

请求发送到的 URI。

type
Type

要反序列化到和返回的对象的类型。

options
JsonSerializerOptions

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

cancellationToken
CancellationToken

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

返回

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

属性

例外

client 是 null。

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

适用于

DeleteFromJsonAsync(HttpClient, String, Type, JsonSerializerContext, CancellationToken)

Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

public static System.Threading.Tasks.Task<object?> DeleteFromJsonAsync(this System.Net.Http.HttpClient client, string? requestUri, Type type, System.Text.Json.Serialization.JsonSerializerContext context, System.Threading.CancellationToken cancellationToken = default);
static member DeleteFromJsonAsync : System.Net.Http.HttpClient * string * Type * System.Text.Json.Serialization.JsonSerializerContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
<Extension()>
Public Function DeleteFromJsonAsync (client As HttpClient, requestUri As String, type As Type, context As JsonSerializerContext, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

参数

client
HttpClient

用于发送请求的客户端。

requestUri
String

请求发送到的 URI。

type
Type

要反序列化到和返回的对象的类型。

context
JsonSerializerContext

用于控制反序列化行为的 JsonSerializerContext。

cancellationToken
CancellationToken

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

返回

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

例外

client 是 null。

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

适用于

DeleteFromJsonAsync(HttpClient, Uri, Type, JsonSerializerOptions, CancellationToken)

Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

[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<object?> DeleteFromJsonAsync(this System.Net.Http.HttpClient client, Uri? requestUri, Type type, System.Text.Json.JsonSerializerOptions? options, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<object?> DeleteFromJsonAsync(this System.Net.Http.HttpClient client, Uri? requestUri, Type type, System.Text.Json.JsonSerializerOptions? options, 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 DeleteFromJsonAsync : System.Net.Http.HttpClient * Uri * Type * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
static member DeleteFromJsonAsync : System.Net.Http.HttpClient * Uri * Type * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
<Extension()>
Public Function DeleteFromJsonAsync (client As HttpClient, requestUri As Uri, type As Type, options As JsonSerializerOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

参数

client
HttpClient

用于发送请求的客户端。

requestUri
Uri

请求发送到的 URI。

type
Type

要反序列化到和返回的对象的类型。

options
JsonSerializerOptions

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

cancellationToken
CancellationToken

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

返回

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

属性

例外

client 是 null。

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

适用于

DeleteFromJsonAsync(HttpClient, Uri, Type, JsonSerializerContext, CancellationToken)

Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

public static System.Threading.Tasks.Task<object?> DeleteFromJsonAsync(this System.Net.Http.HttpClient client, Uri? requestUri, Type type, System.Text.Json.Serialization.JsonSerializerContext context, System.Threading.CancellationToken cancellationToken = default);
static member DeleteFromJsonAsync : System.Net.Http.HttpClient * Uri * Type * System.Text.Json.Serialization.JsonSerializerContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
<Extension()>
Public Function DeleteFromJsonAsync (client As HttpClient, requestUri As Uri, type As Type, context As JsonSerializerContext, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

参数

client
HttpClient

用于发送请求的客户端。

requestUri
Uri

请求发送到的 URI。

type
Type

要反序列化到和返回的对象的类型。

context
JsonSerializerContext

用于控制反序列化行为的 JsonSerializerContext。

cancellationToken
CancellationToken

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

返回

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

例外

client 是 null。

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

适用于

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

Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

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

类型参数

TValue

要反序列化的目标类型。

参数

client
HttpClient

用于发送请求的客户端。

requestUri
Uri

请求发送到的 URI。

jsonTypeInfo
JsonTypeInfo<TValue>

用于控制反序列化行为的 JsonTypeInfo。

cancellationToken
CancellationToken

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

返回

Task<TValue>

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

例外

client 是 null。

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

适用于

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

Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

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

类型参数

TValue

要反序列化的目标类型。

参数

client
HttpClient

用于发送请求的客户端。

requestUri
Uri

请求发送到的 URI。

options
JsonSerializerOptions

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

cancellationToken
CancellationToken

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

返回

Task<TValue>

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

属性

例外

client 是 null。

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

适用于

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

Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

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

类型参数

TValue

要反序列化的目标类型。

参数

client
HttpClient

用于发送请求的客户端。

requestUri
String

请求发送到的 URI。

jsonTypeInfo
JsonTypeInfo<TValue>

用于控制反序列化行为的 JsonTypeInfo。

cancellationToken
CancellationToken

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

返回

Task<TValue>

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

例外

client 是 null。

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

适用于

DeleteFromJsonAsync<TValue>(HttpClient, Uri, CancellationToken)

Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

[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<TValue?> DeleteFromJsonAsync<TValue>(this System.Net.Http.HttpClient client, Uri? requestUri, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<TValue?> DeleteFromJsonAsync<TValue>(this System.Net.Http.HttpClient client, Uri? requestUri, 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 DeleteFromJsonAsync : System.Net.Http.HttpClient * Uri * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Value>
static member DeleteFromJsonAsync : System.Net.Http.HttpClient * Uri * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Value>
<Extension()>
Public Function DeleteFromJsonAsync(Of TValue) (client As HttpClient, requestUri As Uri, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TValue)

类型参数

TValue

要反序列化的目标类型。

参数

client
HttpClient

用于发送请求的客户端。

requestUri
Uri

请求发送到的 URI。

cancellationToken
CancellationToken

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

返回

Task<TValue>

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

属性

例外

client 是 null。

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

适用于

DeleteFromJsonAsync<TValue>(HttpClient, String, CancellationToken)

Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

[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<TValue?> DeleteFromJsonAsync<TValue>(this System.Net.Http.HttpClient client, string? requestUri, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<TValue?> DeleteFromJsonAsync<TValue>(this System.Net.Http.HttpClient client, string? requestUri, 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 DeleteFromJsonAsync : System.Net.Http.HttpClient * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Value>
static member DeleteFromJsonAsync : System.Net.Http.HttpClient * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Value>
<Extension()>
Public Function DeleteFromJsonAsync(Of TValue) (client As HttpClient, requestUri As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TValue)

类型参数

TValue

要反序列化的目标类型。

参数

client
HttpClient

用于发送请求的客户端。

requestUri
String

请求发送到的 URI。

cancellationToken
CancellationToken

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

返回

Task<TValue>

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

属性

例外

client 是 null。

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

适用于

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

Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs
Source:
HttpClientJsonExtensions.Delete.cs

将 DELETE 请求发送到指定的 Uri,并返回在异步操作中将响应正文反序列化为 JSON 的结果的值。

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

类型参数

TValue

要反序列化的目标类型。

参数

client
HttpClient

用于发送请求的客户端。

requestUri
String

请求发送到的 URI。

options
JsonSerializerOptions

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

cancellationToken
CancellationToken

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

返回

Task<TValue>

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

属性

例外

client 是 null。

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

适用于