Skip to main content

RestHandler

Assembly: ServiceStack.dll
View Source
Declaration
public class RestHandler : ServiceStackHandlerBase, IHttpAsyncHandler, IHttpHandler, IServiceStackHandler, IRequestHttpHandler

Properties

RestPath

View Source
Declaration
public IRestPath RestPath { get; set; }

ResponseContentType

View Source
Declaration
public string ResponseContentType { get; set; }

Inherited Properties

HandlerAttributes

View Source
Declaration
public RequestAttributes HandlerAttributes { get; set; }

IsReusable

View Source
Declaration
public override bool IsReusable { get; }

Methods

FindMatchingRestPath(IHttpRequest, out String)

View Source
Declaration
public static IRestPath FindMatchingRestPath(IHttpRequest httpReq, out string contentType)
Returns

ServiceStack.Web.IRestPath

Parameters
TypeName
ServiceStack.Web.IHttpRequesthttpReq
System.StringcontentType

FindMatchingRestPath(String, String, out String)

View Source
Declaration
public static IRestPath FindMatchingRestPath(string httpMethod, string pathInfo, out string contentType)
Returns

ServiceStack.Web.IRestPath

Parameters
TypeName
System.StringhttpMethod
System.StringpathInfo
System.StringcontentType

GetSanitizedPathInfo(String, out String)

View Source
Declaration
public static string GetSanitizedPathInfo(string pathInfo, out string contentType)
Returns

System.String

Parameters
TypeName
System.StringpathInfo
System.StringcontentType

GetRestPath(IHttpRequest)

View Source
Declaration
public IRestPath GetRestPath(IHttpRequest httpReq)
Returns

ServiceStack.Web.IRestPath

Parameters
TypeName
ServiceStack.Web.IHttpRequesthttpReq

RunAsAsync()

View Source
Declaration
public override bool RunAsAsync()
Returns

System.Boolean

ProcessRequestAsync(IRequest, IResponse, String)

View Source
Declaration
public override async Task ProcessRequestAsync(IRequest req, IResponse httpRes, string operationName)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Web.IRequestreq
ServiceStack.Web.IResponsehttpRes
System.StringoperationName

CreateRequestAsync(IRequest, IRestPath)

View Source
Declaration
public static async Task<object> CreateRequestAsync(IRequest httpReq, IRestPath restPath)
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Web.IRestPathrestPath

CreateRequestAsync(IRequest, IRestPath, Dictionary<String, String>)

View Source
Declaration
public static async Task<object> CreateRequestAsync(IRequest httpReq, IRestPath restPath, Dictionary<string, string> requestParams)
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Web.IRestPathrestPath
System.Collections.Generic.Dictionary<System.String,System.String>requestParams

CreateRequest(IRequest, IRestPath, Dictionary<String, String>, Object)

View Source
Declaration
public static object CreateRequest(IRequest httpReq, IRestPath restPath, Dictionary<string, string> requestParams, object requestDto)
Returns

System.Object

Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Web.IRestPathrestPath
System.Collections.Generic.Dictionary<System.String,System.String>requestParams
System.ObjectrequestDto

CreateRequestAsync(IRequest, String)

Used in Unit tests

View Source
Declaration
public Task<object> CreateRequestAsync(IRequest httpReq, string operationName)
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
System.StringoperationName

Inherited Methods

AssertAccess(IHttpRequest, IHttpResponse, Feature, String)

View Source
Declaration
protected bool AssertAccess(IHttpRequest httpReq, IHttpResponse httpRes, Feature feature, string operationName)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.Web.IHttpRequesthttpReq
ServiceStack.Web.IHttpResponsehttpRes
ServiceStack.Featurefeature
System.StringoperationName

AssertOperationExists(String, Type)

View Source
Declaration
protected static void AssertOperationExists(string operationName, Type type)
Parameters
TypeName
System.StringoperationName
System.Typetype

CreateContentTypeRequestAsync(IRequest, Type, String)

View Source
Declaration
protected static async Task<object> CreateContentTypeRequestAsync(IRequest httpReq, Type requestType, string contentType)
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
System.TyperequestType
System.StringcontentType

DeserializeHttpRequestAsync(Type, IRequest, String)

View Source
Declaration
public static Task<object> DeserializeHttpRequestAsync(Type operationType, IRequest httpReq, string contentType)
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
System.TypeoperationType
ServiceStack.Web.IRequesthttpReq
System.StringcontentType

ExecuteService(Object, IRequest)

View Source
Declaration
protected static object ExecuteService(object request, IRequest httpReq)
Returns

System.Object

Parameters
TypeName
System.Objectrequest
ServiceStack.Web.IRequesthttpReq

GetCustomRequestFromBinder(IRequest, Type)

View Source
Declaration
protected static object GetCustomRequestFromBinder(IRequest httpReq, Type requestType)
Returns

System.Object

Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
System.TyperequestType

GetOperationType(String)

View Source
Declaration
public static Type GetOperationType(string operationName)
Returns

System.Type

Parameters
TypeName
System.StringoperationName

GetResponseAsync(IRequest, Object)

View Source
Declaration
public virtual Task<object> GetResponseAsync(IRequest httpReq, object request)
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
System.Objectrequest

HandleResponse(IRequest, IResponse, Object)

View Source
Declaration
public async Task HandleResponse(IRequest httpReq, IResponse httpRes, object response)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
ServiceStack.Web.IResponsehttpRes
System.Objectresponse

UpdateResponseContentType(IRequest, Object)

View Source
Declaration
public void UpdateResponseContentType(IRequest httpReq, object response)
Parameters
TypeName
ServiceStack.Web.IRequesthttpReq
System.Objectresponse

WriteDebugResponse(IResponse, Object)

View Source
Declaration
public Task WriteDebugResponse(IResponse httpRes, object response)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Web.IResponsehttpRes
System.Objectresponse

Implements