throws CertServiceApiResponseException, HttpClientException {
try (CloseableHttpClient httpClient = httpClientProvider.getClient()) {
- LOGGER.info(String.format("Sending request to API. Url: %s ", certServiceAddress + caName));
+ LOGGER.info("Sending request to API. Url: {}{} ", certServiceAddress, caName);
HttpResponse httpResponse = httpClient.execute(createHttpRequest(caName, csr, encodedPk));
LOGGER.info("Received response from API");
return extractCertServiceResponse(httpResponse);
} catch (IOException e) {
- LOGGER.error(String.format("Failed execute request to API for URL: '%s' . Exception message: '%s'",
- certServiceAddress + caName, e.getMessage()));
+ LOGGER.error("Failed execute request to API for URL: {}{} . Exception message: {}",
+ certServiceAddress, caName, e.getMessage());
throw new HttpClientException(e);
}
}
throws CertServiceApiResponseException, HttpClientException {
int httpResponseCode = getStatusCode(httpResponse);
if (HttpStatus.SC_OK != httpResponseCode) {
- LOGGER.error(String.format("Error on API response. Response Code: %d", httpResponseCode));
+ LOGGER.error("Error on API response. Response Code: {}", httpResponseCode);
throw generateApiResponseException(httpResponse);
}
String jsonResponse = getStringResponse(httpResponse.getEntity());