HttpClientJsonExtensions.PatchAsJsonAsync Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Överlagringar
| Name | Description |
|---|---|
| PatchAsJsonAsync<TValue>(HttpClient, Uri, TValue, JsonTypeInfo<TValue>, CancellationToken) |
Skickar en PATCH-begäran till den angivna URI:n som innehåller |
| PatchAsJsonAsync<TValue>(HttpClient, String, TValue, JsonTypeInfo<TValue>, CancellationToken) |
Skickar en PATCH-begäran till den angivna URI:n som innehåller |
| PatchAsJsonAsync<TValue>(HttpClient, Uri, TValue, JsonSerializerOptions, CancellationToken) |
Skickar en PATCH-begäran till den angivna URI:n som innehåller |
| PatchAsJsonAsync<TValue>(HttpClient, Uri, TValue, CancellationToken) |
Skickar en PATCH-begäran till den angivna URI:n som innehåller |
| PatchAsJsonAsync<TValue>(HttpClient, String, TValue, CancellationToken) |
Skickar en PATCH-begäran till den angivna URI:n som innehåller |
| PatchAsJsonAsync<TValue>(HttpClient, String, TValue, JsonSerializerOptions, CancellationToken) |
Skickar en PATCH-begäran till den angivna URI:n som innehåller |
PatchAsJsonAsync<TValue>(HttpClient, Uri, TValue, JsonTypeInfo<TValue>, CancellationToken)
Skickar en PATCH-begäran till den angivna URI:n som innehåller value serialiserad som JSON i begärandetexten.
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)
Typparametrar
- TValue
Typ av värde som ska serialiseras.
Parametrar
- client
- HttpClient
Klienten som användes för att skicka begäran.
- requestUri
- Uri
Den URI som begäran skickas till.
- value
- TValue
Värdet som ska serialiseras.
- jsonTypeInfo
- JsonTypeInfo<TValue>
JsonTypeInfo som används för att kontrollera beteendet under serialiseringen.
- cancellationToken
- CancellationToken
En annulleringstoken som kan användas av andra objekt eller trådar för att få meddelande om annullering.
Returer
Aktivitetsobjektet som representerar den asynkrona åtgärden.
Undantag
client är null.
Annulleringstoken avbröts. Det här undantaget lagras i den returnerade aktiviteten.
Gäller för
PatchAsJsonAsync<TValue>(HttpClient, String, TValue, JsonTypeInfo<TValue>, CancellationToken)
Skickar en PATCH-begäran till den angivna URI:n som innehåller value serialiserad som JSON i begärandetexten.
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)
Typparametrar
- TValue
Typ av värde som ska serialiseras.
Parametrar
- client
- HttpClient
Klienten som användes för att skicka begäran.
- requestUri
- String
Den URI som begäran skickas till.
- value
- TValue
Värdet som ska serialiseras.
- jsonTypeInfo
- JsonTypeInfo<TValue>
JsonTypeInfo som används för att kontrollera beteendet under serialiseringen.
- cancellationToken
- CancellationToken
En annulleringstoken som kan användas av andra objekt eller trådar för att få meddelande om annullering.
Returer
Aktivitetsobjektet som representerar den asynkrona åtgärden.
Undantag
client är null.
Annulleringstoken avbröts. Det här undantaget lagras i den returnerade aktiviteten.
Gäller för
PatchAsJsonAsync<TValue>(HttpClient, Uri, TValue, JsonSerializerOptions, CancellationToken)
Skickar en PATCH-begäran till den angivna URI:n som innehåller value serialiserad som JSON i begärandetexten.
[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)
Typparametrar
- TValue
Typ av värde som ska serialiseras.
Parametrar
- client
- HttpClient
Klienten som användes för att skicka begäran.
- requestUri
- Uri
Den URI som begäran skickas till.
- value
- TValue
Värdet som ska serialiseras.
- options
- JsonSerializerOptions
Alternativ för att styra beteendet under serialiseringen. Standardalternativen är de som anges av Web.
- cancellationToken
- CancellationToken
En annulleringstoken som kan användas av andra objekt eller trådar för att få meddelande om annullering.
Returer
Aktivitetsobjektet som representerar den asynkrona åtgärden.
- Attribut
Undantag
client är null.
Annulleringstoken avbröts. Det här undantaget lagras i den returnerade aktiviteten.
Gäller för
PatchAsJsonAsync<TValue>(HttpClient, Uri, TValue, CancellationToken)
Skickar en PATCH-begäran till den angivna URI:n som innehåller value serialiserad som JSON i begärandetexten.
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)
Typparametrar
- TValue
Typ av värde som ska serialiseras.
Parametrar
- client
- HttpClient
Klienten som användes för att skicka begäran.
- requestUri
- Uri
Den URI som begäran skickas till.
- value
- TValue
Värdet som ska serialiseras.
- cancellationToken
- CancellationToken
En annulleringstoken som kan användas av andra objekt eller trådar för att få meddelande om annullering.
Returer
Aktivitetsobjektet som representerar den asynkrona åtgärden.
- Attribut
Undantag
client är null.
Annulleringstoken avbröts. Det här undantaget lagras i den returnerade aktiviteten.
Gäller för
PatchAsJsonAsync<TValue>(HttpClient, String, TValue, CancellationToken)
Skickar en PATCH-begäran till den angivna URI:n som innehåller value serialiserad som JSON i begärandetexten.
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)
Typparametrar
- TValue
Typ av värde som ska serialiseras.
Parametrar
- client
- HttpClient
Klienten som användes för att skicka begäran.
- requestUri
- String
Den URI som begäran skickas till.
- value
- TValue
Värdet som ska serialiseras.
- cancellationToken
- CancellationToken
En annulleringstoken som kan användas av andra objekt eller trådar för att få meddelande om annullering.
Returer
Aktivitetsobjektet som representerar den asynkrona åtgärden.
- Attribut
Undantag
client är null.
Annulleringstoken avbröts. Det här undantaget lagras i den returnerade aktiviteten.
Gäller för
PatchAsJsonAsync<TValue>(HttpClient, String, TValue, JsonSerializerOptions, CancellationToken)
Skickar en PATCH-begäran till den angivna URI:n som innehåller value serialiserad som JSON i begärandetexten.
[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)
Typparametrar
- TValue
Typ av värde som ska serialiseras.
Parametrar
- client
- HttpClient
Klienten som användes för att skicka begäran.
- requestUri
- String
Den URI som begäran skickas till.
- value
- TValue
Värdet som ska serialiseras.
- options
- JsonSerializerOptions
Alternativ för att styra beteendet under serialiseringen. Standardalternativen är de som anges av Web.
- cancellationToken
- CancellationToken
En annulleringstoken som kan användas av andra objekt eller trådar för att få meddelande om annullering.
Returer
Aktivitetsobjektet som representerar den asynkrona åtgärden.
- Attribut
Undantag
client är null.
Annulleringstoken avbröts. Det här undantaget lagras i den returnerade aktiviteten.