IHttpApiGetTData(HttpApiGetRequest) Method
|
Make a GET request and return the data or error of the request
Namespace: Casewhere.Runtime.DSL.ApiAssembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.5.0
SyntaxHttpApiResponse<TData, string> Get<TData>(
HttpApiGetRequest httpApiGetRequest
)
Parameters
- httpApiGetRequest HttpApiGetRequest
- A GET request
Type Parameters
- TData
- The data type
Return Value
HttpApiResponseTData,
StringReturn a HttpApiResponse
Examplevar 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;
See Also