Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface Microsoft.​AspNetCore.​Http.​Metadata.​IAcceptsMetadata
Assembly: Microsoft.AspNetCore.Http.Abstractions
Interface for accepting request media types.
Properties
System.​Collections.​Generic.​IReadOnlyList<​string>
ContentTypes
Gets a list of the allowed request content types.
If the incoming request contains a <c>Content-Type</c> and the content type is not
one of these values, the request will be rejected with a 415 response. If the
incoming request does not contain a <c>Content-Type</c> header, the content type
check will be bypassed.
RequestType
Gets the type being read from the request.
bool
IsOptional
Gets a value that determines if the request body is optional.