SaaS CMS has officially launched! Learn more now.

Class RestHttpHandler

A http handler

Inheritance
System.Object
RestHttpHandler
Implements
System.Web.IHttpHandler
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Shell.Services.Rest
Assembly: EPiServer.Shell.dll
Version: 7.19.2
Syntax
public class RestHttpHandler : IHttpHandler

Constructors

RestHttpHandler(RequestContext)

Initializes a new instance of the RestHttpHandler class.

Declaration
public RestHttpHandler(RequestContext requestContext)
Parameters
Type Name Description
System.Web.Routing.RequestContext requestContext

The request context in which the request is processed.

Properties

IsReusable

Gets a value indicating whether another request can use the System.Web.IHttpHandler instance.

Declaration
public bool IsReusable { get; }
Property Value
Type Description
System.Boolean

RequestContext

The context in which the request is executed.

Declaration
public RequestContext RequestContext { get; }
Property Value
Type Description
System.Web.Routing.RequestContext

Methods

ParseRequestUrl(String, out String, out String)

Parses the app relative request URL to find store name and an optional id parameter.

Declaration
protected virtual bool ParseRequestUrl(string url, out string storeName, out string id)
Parameters
Type Name Description
System.String url

The incoming application relative URL.

System.String storeName

Name of the store.

System.String id

An optional id parameter.

Returns
Type Description
System.Boolean

true if parsing succeeds; otherwise false

ProcessRequest(HttpContext)

Processes the request by calling into the unit testable overload.

Declaration
public void ProcessRequest(HttpContext context)
Parameters
Type Name Description
System.Web.HttpContext context

The HTTP context.

ProcessRequest(HttpContextBase)

Performs the actual request processing.

Declaration
public virtual void ProcessRequest(HttpContextBase httpContext)
Parameters
Type Name Description
System.Web.HttpContextBase httpContext

The HTTP context.

ValidateAntiForgeryToken(HttpContextBase)

Validates the Cross site request anti forgery token sent in the header with the token stored in a cookie.

Declaration
protected virtual void ValidateAntiForgeryToken(HttpContextBase httpContext)
Parameters
Type Name Description
System.Web.HttpContextBase httpContext

The HTTP context.

Remarks

Throws an System.Exception if validation fails.

Implements

System.Web.IHttpHandler

Extension Methods