JsonRequestAttribute class
namespace: Serenity.Services assembly: Serenity.Net.Web
An action filter for methods that accept JSON content via their "request" arguments.
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)]
public class JsonRequestAttribute : ActionFilterAttribute
Public Members
| name | description |
|---|---|
| JsonRequestAttribute() | Initializes a new instance of the JsonRequestAttribute class. |
| AllowForm { get; set; } | Gets or sets whether to allow getting the JSON body from the posted form. |
| AllowGet { get; set; } | Gets or sets whether to allow this filter for GET requests. |
| AllowQuery { get; set; } | Gets or sets whether to allow getting the JSON body from the query string. |
| ParamName { get; set; } | Gets or sets the parameter name for the request argument. |
| override OnActionExecutionAsync(…) | |
| static DefaultAllowForm { get; set; } | The default for AllowForm, which is true. |
| static DefaultAllowGet { get; set; } | The default for AllowGet, which is true. |
| static DefaultAllowQuery { get; set; } | The default for AllowQuery, which is true. |
See Also
- Source: JsonRequestAttribute.cs