private IRestResponse Execute(IRestRequest request, string message)
{
if (VerifyLoggedInAuthenticatedAndExtendSession() == false)
{
if (HideCustomExceptions == false)
{
throw new ALMClientException(HttpStatusCode.Unauthorized, "Cannot execute without authenticated user", string.Empty);
}
else
{
return null;
}
}
CleanRequest(ref request);
IRestResponse response = client.Execute(request);
if (response.StatusCode != HttpStatusCode.OK)
{
ThrowExceptionIfNecessary(response, "Execute", message);
}
return response;
}