IWebApi Methods |
The IWebApi type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | AbandonAuthorization |
Stop the flow of initial authorization
|
![]() ![]() | CreateErrorResponse |
Create http error response with status code and message
![]() var webApi = ctx.Use<IWebApi>(); webApi.CreateErrorResponse(401, "You are not authorized"); |
![]() ![]() | CreateResponseT |
Create http response with data
![]() var webApi = ctx.Use<IWebApi>(); var data = new { FirstName = "Thao", LastName = "Dinh" }; webApi.CreateResponse(data); |
![]() | CreateTextResponse |
Create http response with text data
|
![]() ![]() | GetHeaders |
Get headers from the current request
![]() var webApi = ctx.Use<IWebApi>(); var headers = webApi.GetHeaders(); |
![]() ![]() | GetQueryString |
Get query string from the current request
![]() var webApi = ctx.Use<IWebApi>(); var queryString = webApi.GetQueryString(); |
![]() ![]() | GetUri |
Get URI from the current request
![]() var webApi = ctx.Use<IWebApi>(); var uri = webApi.GetUri(); |
![]() | GetUserIp |
Get current user ip
|
![]() ![]() | Redirect |
Redirect the specific url
![]() var webApi = ctx.Use<IWebApi>(); webApi.Redirect("https://api-local.casewhere.com/external/v0.1/trigger/kk-nemlogin-logout-callback?nonce=b3c7c6ea-f38a-4b2a-aa6e-9c69fce65ec1"); |