AcceptsMetadata(String[], Type, Boolean) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new instance of AcceptsMetadata with a type.
public AcceptsMetadata (string[] contentTypes, Type? type = default, bool isOptional = false);
new Microsoft.AspNetCore.Http.Metadata.AcceptsMetadata : string[] * Type * bool -> Microsoft.AspNetCore.Http.Metadata.AcceptsMetadata
Public Sub New (contentTypes As String(), Optional type As Type = Nothing, Optional isOptional As Boolean = false)
Parameters
- contentTypes
- String[]
Content types that are accepted by endpoint.
- type
- Type
The type being read from the request.
- isOptional
- Boolean
Whether the request body is optional.