HttpClientJsonExtensions.PutAsJsonAsync メソッド

定義

オーバーロード

名前 説明
PutAsJsonAsync<TValue>(HttpClient, Uri, TValue, JsonSerializerOptions, CancellationToken)

要求本文で JSON としてシリアル化された value を含む指定した URI に PUT 要求を送信します。

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

要求本文で JSON としてシリアル化された value を含む指定した URI に PUT 要求を送信します。

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

要求本文で JSON としてシリアル化された value を含む指定した URI に PUT 要求を送信します。

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

要求本文で JSON としてシリアル化された value を含む指定した URI に PUT 要求を送信します。

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

要求本文で JSON としてシリアル化された value を含む指定した URI に PUT 要求を送信します。

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

要求本文で JSON としてシリアル化された value を含む指定した URI に PUT 要求を送信します。

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

ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs

要求本文で JSON としてシリアル化された value を含む指定した URI に PUT 要求を送信します。

[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> PutAsJsonAsync<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> PutAsJsonAsync<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.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> PutAsJsonAsync<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 PutAsJsonAsync : System.Net.Http.HttpClient * Uri * 'Value * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
static member PutAsJsonAsync : System.Net.Http.HttpClient * Uri * 'Value * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
[<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 PutAsJsonAsync : System.Net.Http.HttpClient * Uri * 'Value * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
<Extension()>
Public Function PutAsJsonAsync(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

他のオブジェクトまたはスレッドが取り消し通知を受け取るために使用できるキャンセル トークン。

返品

非同期操作を表すタスク オブジェクト。

属性

例外

キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。

適用対象

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

ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs

要求本文で JSON としてシリアル化された value を含む指定した URI に PUT 要求を送信します。

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

他のオブジェクトまたはスレッドが取り消し通知を受け取るために使用できるキャンセル トークン。

返品

非同期操作を表すタスク オブジェクト。

属性

例外

キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。

注釈

このメソッドはシリアル化に JsonSerializerDefaults.Web オプションを使用しますが、シリアル化メソッド JsonSerializer 既定では使用しません。

適用対象

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

ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs

要求本文で JSON としてシリアル化された value を含む指定した URI に PUT 要求を送信します。

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

他のオブジェクトまたはスレッドが取り消し通知を受け取るために使用できるキャンセル トークン。

返品

非同期操作を表すタスク オブジェクト。

属性

例外

キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。

注釈

このメソッドはシリアル化に JsonSerializerDefaults.Web オプションを使用しますが、シリアル化メソッド JsonSerializer 既定では使用しません。

適用対象

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

ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs

要求本文で JSON としてシリアル化された value を含む指定した URI に PUT 要求を送信します。

[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> PutAsJsonAsync<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> PutAsJsonAsync<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.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> PutAsJsonAsync<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 PutAsJsonAsync : System.Net.Http.HttpClient * string * 'Value * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
static member PutAsJsonAsync : System.Net.Http.HttpClient * string * 'Value * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
[<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 PutAsJsonAsync : System.Net.Http.HttpClient * string * 'Value * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
<Extension()>
Public Function PutAsJsonAsync(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

他のオブジェクトまたはスレッドが取り消し通知を受け取るために使用できるキャンセル トークン。

返品

非同期操作を表すタスク オブジェクト。

属性

例外

キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。

適用対象

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

ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs

要求本文で JSON としてシリアル化された value を含む指定した URI に PUT 要求を送信します。

public static System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PutAsJsonAsync<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 PutAsJsonAsync : 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 PutAsJsonAsync(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

他のオブジェクトまたはスレッドが取り消し通知を受け取るために使用できるキャンセル トークン。

返品

非同期操作を表すタスク オブジェクト。

例外

キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。

適用対象

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

ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs
ソース:
HttpClientJsonExtensions.Put.cs

要求本文で JSON としてシリアル化された value を含む指定した URI に PUT 要求を送信します。

public static System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> PutAsJsonAsync<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 PutAsJsonAsync : 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 PutAsJsonAsync(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

他のオブジェクトまたはスレッドが取り消し通知を受け取るために使用できるキャンセル トークン。

返品

非同期操作を表すタスク オブジェクト。

例外

キャンセル トークンが取り消されました。 この例外は、返されたタスクに格納されます。

適用対象