IHttp ApiGetTData(Http Api Get Request) Method
Make a GET request and return the data or error of the request
Definition
Namespace: Casewhere.Runtime.DSL.Api
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.9.8.6
Return a HttpApiResponse
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.9.8.6
C#
HttpApiResponse<TData, string> Get<TData>(
HttpApiGetRequest httpApiGetRequest
)
Parameters
- httpApiGetRequest HttpApiGetRequest
- A GET request
Type Parameters
- TData
- The data type
Return Value
HttpApiResponseTData, StringReturn a HttpApiResponse
Example
C#
var httpApi = @apiFactory.Get<IHttpApi>();
var samlId = "_baed74d5-78b9-4ab5-93fd-f5bb61b10d03";
var url = "https://nemlogin.kk.dk/nemlogin/loggedInService/{samlId}";
var httpResponse = httpApi.Get<bool>(HttpApiRequest.CreateGetRequest(url));
Log.Info("Response: {@response}", httpResponse);
var newSessionStatus = httpResponse.Data;