use of com.opentext.ia.sdk.support.io.RuntimeIoException in project infoarchive-sip-sdk by Enterprise-Content-Management.
the class JwtAuthentication method postToGateway.
private AuthenticationSuccess postToGateway(String payload) {
AuthenticationSuccess result;
String gatewayUrl = gatewayInfo.getGatewayUrl();
Collection<Header> headers = new ArrayList<>(Arrays.asList(gatewayInfo.getAuthorizationHeader(), gatewayInfo.getContentTypeHeader()));
try {
result = httpClient.post(gatewayUrl, headers, AuthenticationSuccess.class, payload);
} catch (IOException ex) {
if (timer != null) {
timer.stop();
}
throw new RuntimeIoException(ex);
}
return result;
}
Aggregations