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
Type | Name |
---|---|
ServiceStack.IReturn | requestDto |
System.String | httpMethod |
System.String | formatFallbackToPredefinedRoute |
ToAbsoluteUri(Object, String, String)
View Source
Declaration
public static string ToAbsoluteUri(this object requestDto, string httpMethod = null, string formatFallbackToPredefinedRoute = null)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Object | requestDto |
System.String | httpMethod |
System.String | formatFallbackToPredefinedRoute |
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
Type | Name |
---|---|
System.Object | requestDto |
ServiceStack.Web.IRequest | req |
System.String | httpMethod |
System.String | formatFallbackToPredefinedRoute |
ToAbsoluteUri(String, IRequest)
View Source
Declaration
public static string ToAbsoluteUri(this string relativeUrl, IRequest req = null)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | relativeUrl |
ServiceStack.Web.IRequest | req |
EndRequest(IResponse, Boolean)
End a ServiceStack Request
View Source
Declaration
public static void EndRequest(this IResponse httpRes, bool skipHeaders = false)
Parameters
Type | Name |
---|---|
ServiceStack.Web.IResponse | httpRes |
System.Boolean | skipHeaders |
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
Type | Name |
---|---|
ServiceStack.Web.IResponse | httpRes |
System.Boolean | skipHeaders |
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
Type | Name |
---|---|
System.Web.HttpResponseBase | httpRes |
System.Boolean | skipHeaders |
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
Type | Name |
---|---|
System.Web.HttpContextBase | context |
System.Boolean | skipHeaders |
System.Boolean | skipClose |
System.Boolean | closeOutputStream |
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
Type | Name |
---|---|
ServiceStack.Web.IResponse | httpRes |
System.Boolean | skipHeaders |
System.Boolean | skipClose |
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
Type | Name |
---|---|
ServiceStack.Web.IResponse | httpRes |
System.Boolean | skipHeaders |
System.Boolean | skipClose |
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
Type | Name |
---|---|
ServiceStack.Web.IResponse | httpRes |
System.Boolean | skipClose |
EndRequestWithNoContent(IResponse)
End a ServiceStack Request with no content
View Source
Declaration
public static void EndRequestWithNoContent(this IResponse httpRes)
Parameters
Type | Name |
---|---|
ServiceStack.Web.IResponse | httpRes |