InputFormatter Class

Definition

Reads an object from the request body.

C#
public abstract class InputFormatter : Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestFormatMetadataProvider, Microsoft.AspNetCore.Mvc.Formatters.IInputFormatter
Inheritance
InputFormatter
Derived
Implements

Constructors

Properties

SupportedMediaTypes

Gets the mutable collection of media type elements supported by this InputFormatter.

Methods

CanRead(InputFormatterContext)

Determines whether this IInputFormatter can deserialize an object of the context's ModelType.

CanReadType(Type)

Determines whether this InputFormatter can deserialize an object of the given type.

GetDefaultValueForType(Type)

Gets the default value for a given type. Used to return a default value when the body contains no content.

GetSupportedContentTypes(String, Type)

Gets a filtered list of content types which are supported by the IInputFormatter for the objectType and contentType.

ReadAsync(InputFormatterContext)

Reads an object from the request body.

ReadRequestBodyAsync(InputFormatterContext)

Reads an object from the request body.

Applies to

Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0