Class AcceptVerbsAttribute
Represents an attribute that specifies which HTTP methods an action method will respond to.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class AcceptVerbsAttribute : Attribute, IActionHttpMethodProvider
- Inheritance
-
AcceptVerbsAttribute
- Implements
- Inherited Members
Constructors
AcceptVerbsAttribute(string)
public AcceptVerbsAttribute(string method)
Parameters
methodstring
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
methodsstring[]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.