HttpGetAttribute Class

Summary

Identifies an action that only supports the HTTP GET method.

Syntax

public class HttpGetAttribute : HttpMethodAttribute, _Attribute, IActionHttpMethodProvider, IRouteTemplateProvider

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.HttpGetAttribute

Constructors

Microsoft.AspNet.Mvc.HttpGetAttribute.HttpGetAttribute()

Creates a new [Microsoft.AspNet.Mvc.HttpGetAttribute](Microsoft.AspNet.Mvc.HttpGetAttribute.yml).

public HttpGetAttribute()
HttpGetAttribute(System.String)

Creates a new [Microsoft.AspNet.Mvc.HttpGetAttribute](Microsoft.AspNet.Mvc.HttpGetAttribute.yml) with the given route template.

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