JsonRequestAttribute class

namespace: Serenity.Services   assemblySerenity.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() Creates a new instance of the attribute
AllowForm { get; set; } True to allow getting JSON body from the posted form
AllowGet { get; set; } True to allow this filter for GET request
AllowQuery { get; set; } True to allow getting JSON body from query string
ParamName { get; set; } The parameter name for "request" argument.
override OnActionExecuting(…)
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