use of cc.protea.util.http.Response in project java-sdk by hyperwallet.
the class HyperwalletApiClient method post.
public <T> T post(final String url, final Object bodyObject, final Class<T> type) {
Response response = null;
try {
Request request = getService(url, false);
String body = bodyObject != null ? encrypt(convert(bodyObject)) : "";
request.setBody(body);
response = request.postResource();
return processResponse(response, type);
} catch (IOException | JOSEException | ParseException e) {
throw new HyperwalletException(e);
}
}
Aggregations