TextInputFormatter TextInputFormatter TextInputFormatter Class

Definition

Reads an object from a request body with a text format.

public abstract class TextInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.InputFormatter
type TextInputFormatter = class
    inherit InputFormatter
Public MustInherit Class TextInputFormatter
Inherits InputFormatter
Inheritance
TextInputFormatterTextInputFormatterTextInputFormatter
Derived

Constructors

TextInputFormatter() TextInputFormatter() TextInputFormatter()

Fields

UTF16EncodingLittleEndian UTF16EncodingLittleEndian UTF16EncodingLittleEndian

Returns UTF16 Encoding which uses littleEndian byte order with BOM and throws on invalid bytes.

UTF8EncodingWithoutBOM UTF8EncodingWithoutBOM UTF8EncodingWithoutBOM

Returns UTF8 Encoding without BOM and throws on invalid bytes.

Properties

SupportedEncodings SupportedEncodings SupportedEncodings

Gets the mutable collection of character encodings supported by this TextInputFormatter. The encodings are used when reading the data.

SupportedMediaTypes SupportedMediaTypes SupportedMediaTypes

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

(Inherited from InputFormatter)

Methods

CanRead(InputFormatterContext) CanRead(InputFormatterContext) CanRead(InputFormatterContext) Inherited from InputFormatter
CanReadType(Type) CanReadType(Type) CanReadType(Type)

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

(Inherited from InputFormatter)
GetDefaultValueForType(Type) GetDefaultValueForType(Type) GetDefaultValueForType(Type)

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

(Inherited from InputFormatter)
GetSupportedContentTypes(String, Type) GetSupportedContentTypes(String, Type) GetSupportedContentTypes(String, Type) Inherited from InputFormatter
ReadAsync(InputFormatterContext) ReadAsync(InputFormatterContext) ReadAsync(InputFormatterContext) Inherited from InputFormatter
ReadRequestBodyAsync(InputFormatterContext) ReadRequestBodyAsync(InputFormatterContext) ReadRequestBodyAsync(InputFormatterContext)
ReadRequestBodyAsync(InputFormatterContext, Encoding) ReadRequestBodyAsync(InputFormatterContext, Encoding) ReadRequestBodyAsync(InputFormatterContext, Encoding)

Reads an object from the request body.

SelectCharacterEncoding(InputFormatterContext) SelectCharacterEncoding(InputFormatterContext) SelectCharacterEncoding(InputFormatterContext)

Returns an Encoding based on context's character set.

Applies to