Dela via


AcceptsMetadata(String[], Type, Boolean) Constructor

Definition

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.

Applies to