Skip to main content

HttpExtensions

Assembly: ServiceStack.dll​
View Source​
Declaration
public static class HttpExtensions

Methods​

ToAbsoluteUri(IReturn, String, String)​

View Source​
Declaration
public static string ToAbsoluteUri(this IReturn requestDto, string httpMethod = null, string formatFallbackToPredefinedRoute = null)
Returns​

System.String

Parameters​
TypeName
ServiceStack.IReturnrequestDto
System.StringhttpMethod
System.StringformatFallbackToPredefinedRoute

ToAbsoluteUri(Object, String, String)​

View Source​
Declaration
public static string ToAbsoluteUri(this object requestDto, string httpMethod = null, string formatFallbackToPredefinedRoute = null)
Returns​

System.String

Parameters​
TypeName
System.ObjectrequestDto
System.StringhttpMethod
System.StringformatFallbackToPredefinedRoute

ToAbsoluteUri(Object, IRequest, String, String)​

View Source​
Declaration
public static string ToAbsoluteUri(this object requestDto, IRequest req, string httpMethod = null, string formatFallbackToPredefinedRoute = null)
Returns​

System.String

Parameters​
TypeName
System.ObjectrequestDto
ServiceStack.Web.IRequestreq
System.StringhttpMethod
System.StringformatFallbackToPredefinedRoute

ToAbsoluteUri(String, IRequest)​

View Source​
Declaration
public static string ToAbsoluteUri(this string relativeUrl, IRequest req = null)
Returns​

System.String

Parameters​
TypeName
System.StringrelativeUrl
ServiceStack.Web.IRequestreq

EndRequest(IResponse, Boolean)​

End a ServiceStack Request

View Source​
Declaration
public static void EndRequest(this IResponse httpRes, bool skipHeaders = false)
Parameters​
TypeName
ServiceStack.Web.IResponsehttpRes
System.BooleanskipHeaders

EndRequestAsync(IResponse, Boolean, Func<IResponse, Task>)​

View Source​
Declaration
public static Task EndRequestAsync(this IResponse httpRes, bool skipHeaders = false, Func<IResponse, Task> afterHeaders = null)
Returns​

System.Threading.Tasks.Task

Parameters​
TypeName
ServiceStack.Web.IResponsehttpRes
System.BooleanskipHeaders
System.Func<ServiceStack.Web.IResponse,System.Threading.Tasks.Task>afterHeaders

EndRequest(HttpResponseBase, Boolean)​

End a ServiceStack Request

View Source​
Declaration
public static void EndRequest(this HttpResponseBase httpRes, bool skipHeaders = false)
Parameters​
TypeName
System.Web.HttpResponseBasehttpRes
System.BooleanskipHeaders

EndHttpHandlerRequest(HttpContextBase, Boolean, Boolean, Boolean, Action<HttpResponseBase>)​

End a HttpHandler Request

View Source​
Declaration
public static void EndHttpHandlerRequest(this HttpContextBase context, bool skipHeaders = false, bool skipClose = false, bool closeOutputStream = false, Action<HttpResponseBase> afterHeaders = null)
Parameters​
TypeName
System.Web.HttpContextBasecontext
System.BooleanskipHeaders
System.BooleanskipClose
System.BooleancloseOutputStream
System.Action<System.Web.HttpResponseBase>afterHeaders

EndHttpHandlerRequest(IResponse, Boolean, Boolean, Action<IResponse>)​

End a HttpHandler Request

View Source​
Declaration
public static void EndHttpHandlerRequest(this IResponse httpRes, bool skipHeaders = false, bool skipClose = false, Action<IResponse> afterHeaders = null)
Parameters​
TypeName
ServiceStack.Web.IResponsehttpRes
System.BooleanskipHeaders
System.BooleanskipClose
System.Action<ServiceStack.Web.IResponse>afterHeaders

EndHttpHandlerRequestAsync(IResponse, Boolean, Boolean, Func<IResponse, Task>)​

View Source​
Declaration
public static async Task EndHttpHandlerRequestAsync(this IResponse httpRes, bool skipHeaders = false, bool skipClose = false, Func<IResponse, Task> afterHeaders = null)
Returns​

System.Threading.Tasks.Task

Parameters​
TypeName
ServiceStack.Web.IResponsehttpRes
System.BooleanskipHeaders
System.BooleanskipClose
System.Func<ServiceStack.Web.IResponse,System.Threading.Tasks.Task>afterHeaders

EndMqRequest(IResponse, Boolean)​

End an MQ Request

View Source​
Declaration
public static void EndMqRequest(this IResponse httpRes, bool skipClose = false)
Parameters​
TypeName
ServiceStack.Web.IResponsehttpRes
System.BooleanskipClose

EndRequestWithNoContent(IResponse)​

End a ServiceStack Request with no content

View Source​
Declaration
public static void EndRequestWithNoContent(this IResponse httpRes)
Parameters​
TypeName
ServiceStack.Web.IResponsehttpRes