Class AcceptVerbsAttribute
Represents an attribute that specifies which HTTP methods an action method will respond to.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
[CLSCompliant(false)]
public sealed class AcceptVerbsAttribute : Attribute
- Inheritance
-
AcceptVerbsAttribute
- Inherited Members
Constructors
AcceptVerbsAttribute(params string[])
Initializes a new instance of the AcceptVerbsAttribute class by using a list of HTTP methods that the action method will respond to.
public AcceptVerbsAttribute(params string[] methods)
Parameters
methods
string[]The HTTP methods that the action method will respond to.
Properties
HttpMethods
Gets or sets the list of HTTP methods that the action method will respond to.
public Collection<HttpMethod> HttpMethods { get; }
Property Value
- Collection<HttpMethod>
Gets or sets the list of HTTP methods that the action method will respond to.