Share via


HttpRequestJsonExtensions Class

Definition

Extension methods to read the request body as JSON.

public ref class HttpRequestJsonExtensions abstract sealed
public static class HttpRequestJsonExtensions
type HttpRequestJsonExtensions = class
Public Module HttpRequestJsonExtensions
Inheritance
HttpRequestJsonExtensions

Methods

HasJsonContentType(HttpRequest)

Checks the Content-Type header for JSON types.

ReadFromJsonAsync(HttpRequest, JsonTypeInfo, CancellationToken)

Read JSON from the request and deserialize to object type. If the request's content-type is not a known JSON type then an error will be thrown.

ReadFromJsonAsync(HttpRequest, Type, CancellationToken)

Read JSON from the request and deserialize to the specified type. If the request's content-type is not a known JSON type then an error will be thrown.

ReadFromJsonAsync(HttpRequest, Type, JsonSerializerContext, CancellationToken)

Read JSON from the request and deserialize to the specified type. If the request's content-type is not a known JSON type then an error will be thrown.

ReadFromJsonAsync(HttpRequest, Type, JsonSerializerOptions, CancellationToken)

Read JSON from the request and deserialize to the specified type. If the request's content-type is not a known JSON type then an error will be thrown.

ReadFromJsonAsync<TValue>(HttpRequest, CancellationToken)

Read JSON from the request and deserialize to the specified type. If the request's content-type is not a known JSON type then an error will be thrown.

ReadFromJsonAsync<TValue>(HttpRequest, JsonSerializerOptions, CancellationToken)

Read JSON from the request and deserialize to the specified type. If the request's content-type is not a known JSON type then an error will be thrown.

ReadFromJsonAsync<TValue>(HttpRequest, JsonTypeInfo<TValue>, CancellationToken)

Read JSON from the request and deserialize to the specified type. If the request's content-type is not a known JSON type then an error will be thrown.

Applies to