<PackageReference Include="System.Net.Http.Json" Version="11.0.0-rc.3.26522.148" />

System.Net.Http.Json.HttpClientJsonExtensions

public static class HttpClientJsonExtensions
Contains extension methods to send and receive HTTP content as JSON.
public static Task<object> DeleteFromJsonAsync(this HttpClient client, string requestUri, Type type, JsonSerializerOptions options, CancellationToken cancellationToken = default)

Sends a DELETE request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<object> DeleteFromJsonAsync(this HttpClient client, Uri requestUri, Type type, JsonSerializerOptions options, CancellationToken cancellationToken = default)

Sends a DELETE request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<TValue> DeleteFromJsonAsync<TValue>(this HttpClient client, string requestUri, JsonSerializerOptions options, CancellationToken cancellationToken = default)

Sends a DELETE request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<TValue> DeleteFromJsonAsync<TValue>(this HttpClient client, Uri requestUri, JsonSerializerOptions options, CancellationToken cancellationToken = default)

Sends a DELETE request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<object> DeleteFromJsonAsync(this HttpClient client, string requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default)

Sends a DELETE request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<object> DeleteFromJsonAsync(this HttpClient client, Uri requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default)

Sends a DELETE request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<TValue> DeleteFromJsonAsync<TValue>(this HttpClient client, string requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)

Sends a DELETE request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<TValue> DeleteFromJsonAsync<TValue>(this HttpClient client, Uri requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)

Sends a DELETE request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<object> DeleteFromJsonAsync(this HttpClient client, string requestUri, Type type, CancellationToken cancellationToken = default)

Sends a DELETE request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<object> DeleteFromJsonAsync(this HttpClient client, Uri requestUri, Type type, CancellationToken cancellationToken = default)

Sends a DELETE request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<TValue> DeleteFromJsonAsync<TValue>(this HttpClient client, string requestUri, CancellationToken cancellationToken = default)

Sends a DELETE request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<TValue> DeleteFromJsonAsync<TValue>(this HttpClient client, Uri requestUri, CancellationToken cancellationToken = default)

Sends a DELETE request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static IAsyncEnumerable<TValue> GetFromJsonAsAsyncEnumerable<TValue>(this HttpClient client, string requestUri, JsonSerializerOptions options, CancellationToken cancellationToken = default)

Sends an HTTP GET request to the specified requestUri and returns the value that results from deserializing the response body as JSON in an async enumerable operation.

public static IAsyncEnumerable<TValue> GetFromJsonAsAsyncEnumerable<TValue>(this HttpClient client, Uri requestUri, JsonSerializerOptions options, CancellationToken cancellationToken = default)

Sends an HTTP GETrequest to the specified requestUri and returns the value that results from deserializing the response body as JSON in an async enumerable operation.

public static IAsyncEnumerable<TValue> GetFromJsonAsAsyncEnumerable<TValue>(this HttpClient client, string requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)

Sends an HTTP GETrequest to the specified requestUri and returns the value that results from deserializing the response body as JSON in an async enumerable operation.

public static IAsyncEnumerable<TValue> GetFromJsonAsAsyncEnumerable<TValue>(this HttpClient client, Uri requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)

Sends an HTTP GETrequest to the specified requestUri and returns the value that results from deserializing the response body as JSON in an async enumerable operation.

public static IAsyncEnumerable<TValue> GetFromJsonAsAsyncEnumerable<TValue>(this HttpClient client, string requestUri, CancellationToken cancellationToken = default)

Sends an HTTP GETrequest to the specified requestUri and returns the value that results from deserializing the response body as JSON in an async enumerable operation.

public static IAsyncEnumerable<TValue> GetFromJsonAsAsyncEnumerable<TValue>(this HttpClient client, Uri requestUri, CancellationToken cancellationToken = default)

Sends an HTTP GETrequest to the specified requestUri and returns the value that results from deserializing the response body as JSON in an async enumerable operation.

public static Task<object> GetFromJsonAsync(this HttpClient client, string requestUri, Type type, JsonSerializerOptions options, CancellationToken cancellationToken = default)

Sends a GET request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<object> GetFromJsonAsync(this HttpClient client, Uri requestUri, Type type, JsonSerializerOptions options, CancellationToken cancellationToken = default)

Sends a GET request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<TValue> GetFromJsonAsync<TValue>(this HttpClient client, string requestUri, JsonSerializerOptions options, CancellationToken cancellationToken = default)

Sends a GET request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<TValue> GetFromJsonAsync<TValue>(this HttpClient client, Uri requestUri, JsonSerializerOptions options, CancellationToken cancellationToken = default)

Sends a GET request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<object> GetFromJsonAsync(this HttpClient client, string requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default)

Sends a GET request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<object> GetFromJsonAsync(this HttpClient client, Uri requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default)

Sends a GET request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<TValue> GetFromJsonAsync<TValue>(this HttpClient client, string requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)

Sends a GET request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<TValue> GetFromJsonAsync<TValue>(this HttpClient client, Uri requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)

Sends a GET request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<object> GetFromJsonAsync(this HttpClient client, string requestUri, Type type, CancellationToken cancellationToken = default)

Sends a GET request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<object> GetFromJsonAsync(this HttpClient client, Uri requestUri, Type type, CancellationToken cancellationToken = default)

Sends a GET request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<TValue> GetFromJsonAsync<TValue>(this HttpClient client, string requestUri, CancellationToken cancellationToken = default)

Sends a GET request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<TValue> GetFromJsonAsync<TValue>(this HttpClient client, Uri requestUri, CancellationToken cancellationToken = default)

Sends a GET request to the specified Uri and returns the value that results from deserializing the response body as JSON in an asynchronous operation.

public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, string requestUri, TValue value, JsonSerializerOptions options = null, CancellationToken cancellationToken = default)

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

public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri requestUri, TValue value, JsonSerializerOptions options = null, CancellationToken cancellationToken = default)

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

public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, string requestUri, TValue value, CancellationToken cancellationToken)

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

public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri requestUri, TValue value, CancellationToken cancellationToken)

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

public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, string requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)

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

public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)

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

public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, string requestUri, TValue value, JsonSerializerOptions options = null, CancellationToken cancellationToken = default)

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

public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri requestUri, TValue value, JsonSerializerOptions options = null, CancellationToken cancellationToken = default)

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

public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, string requestUri, TValue value, CancellationToken cancellationToken)

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

public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri requestUri, TValue value, CancellationToken cancellationToken)

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

public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, string requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)

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

public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)

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

public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, string requestUri, TValue value, JsonSerializerOptions options = null, CancellationToken cancellationToken = default)

Send a PUT request to the specified Uri containing the value serialized as JSON in the request body.

public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri requestUri, TValue value, JsonSerializerOptions options = null, CancellationToken cancellationToken = default)

Send a PUT request to the specified Uri containing the value serialized as JSON in the request body.

public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, string requestUri, TValue value, CancellationToken cancellationToken)

Send a PUT request to the specified Uri containing the value serialized as JSON in the request body.

public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri requestUri, TValue value, CancellationToken cancellationToken)

Send a PUT request to the specified Uri containing the value serialized as JSON in the request body.

public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, string requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)

Send a PUT request to the specified Uri containing the value serialized as JSON in the request body.

public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)

Send a PUT request to the specified Uri containing the value serialized as JSON in the request body.