HttpPostAttribute Class

Identifies an action that only supports the HTTP POST method.

Namespace
Microsoft.AspNetCore.Mvc
Assemblies
  • Microsoft.AspNetCore.Mvc.Core

Syntax

public class HttpPostAttribute : HttpMethodAttribute, _Attribute, IActionHttpMethodProvider, IRouteTemplateProvider
class Microsoft.AspNetCore.Mvc.HttpPostAttribute

Constructors

HttpPostAttribute()

Creates a new Microsoft.AspNetCore.Mvc.HttpPostAttribute.

public HttpPostAttribute()
HttpPostAttribute(System.String)

Creates a new Microsoft.AspNetCore.Mvc.HttpPostAttribute with the given route template.

Arguments:template (System.String) – The route template. May not be null.
public HttpPostAttribute(string template)