/** * Sets the status code for this response. * * @param status the status code for this response. */ public void setStatus(final int status) { // the order is important here as statusDC.setXXX will reset the parsedIntStatus httpStatus = HttpStatus.getHttpStatus(status); }
/** * Sets the status code for this response. * * @param status the status code for this response. */ public void setStatus(final int status) { // the order is important here as statusDC.setXXX will reset the parsedIntStatus httpStatus = HttpStatus.getHttpStatus(status); }
/** * Sets the status code for this response. * * @param status the status code for this response. */ public void setStatus(final int status) { // the order is important here as statusDC.setXXX will reset the parsedIntStatus httpStatus = HttpStatus.getHttpStatus(status); }
/** * Sets the status code for this response. * * @param status the status code for this response. */ public void setStatus(final int status) { // the order is important here as statusDC.setXXX will reset the parsedIntStatus httpStatus = HttpStatus.getHttpStatus(status); }
/** * Sets the status code for this response. * * @param status the status code for this response. */ public void setStatus(final int status) { // the order is important here as statusDC.setXXX will reset the parsedIntStatus httpStatus = HttpStatus.getHttpStatus(status); }
/** * Sets the status code for this response. * * @param status the status code for this response. */ public void setStatus(final int status) { // the order is important here as statusDC.setXXX will reset the parsedIntStatus httpStatus = HttpStatus.getHttpStatus(status); }
/** * Sets the status code for this response. * * @param status the status code for this response. */ public void setStatus(final int status) { // the order is important here as statusDC.setXXX will reset the parsedIntStatus httpStatus = HttpStatus.getHttpStatus(status); }
/** * Sets the status code for this response. * * @param status the status code for this response. */ public void setStatus(final int status) { // the order is important here as statusDC.setXXX will reset the parsedIntStatus httpStatus = HttpStatus.getHttpStatus(status); }
/** * Sets the status code for this response. * * @param status the status code for this response. */ public void setStatus(final int status) { // the order is important here as statusDC.setXXX will reset the parsedIntStatus httpStatus = HttpStatus.getHttpStatus(status); }
/** * Sets the status code for this response. * * @param status the status code for this response. */ public void setStatus(final int status) { // the order is important here as statusDC.setXXX will reset the parsedIntStatus httpStatus = HttpStatus.getHttpStatus(status); }
private void executeHttpRequest(HttpRequestBase httpRequest, RequestContext rc) { try (CloseableHttpClient httpClient = HttpClients.createDefault()) { HttpResponse response = httpClient.execute(httpRequest); int responseCode = response.getStatusLine().getStatusCode(); HttpEntity entity = response.getEntity(); String responseOutput = EntityUtils.toString(entity); if (responseCode == 200) { doSuccess(rc, responseCode, responseOutput); } else { doFailure(rc, HttpStatus.getHttpStatus(responseCode), response.getStatusLine().getReasonPhrase()); } } catch (Exception e) { logger.error("An error occurred when executing http request", e); doFailure(rc, HttpStatus.INTERNAL_SERVER_ERROR_500, e.toString()); } }
final HttpStatus httpStatus = HttpStatus.getHttpStatus(status); if (httpStatus != null && httpStatus.getReasonPhrase() != null) { nonNullMsg = httpStatus.getReasonPhrase();
final HttpStatus httpStatus = HttpStatus.getHttpStatus(status); if (httpStatus != null && httpStatus.getReasonPhrase() != null) { nonNullMsg = httpStatus.getReasonPhrase();
final HttpStatus httpStatus = HttpStatus.getHttpStatus(status); if (httpStatus != null && httpStatus.getReasonPhrase() != null) { nonNullMsg = httpStatus.getReasonPhrase();
final HttpStatus httpStatus = HttpStatus.getHttpStatus(status); if (httpStatus != null && httpStatus.getReasonPhrase() != null) { nonNullMsg = httpStatus.getReasonPhrase();
final HttpStatus httpStatus = HttpStatus.getHttpStatus(status); if (httpStatus != null && httpStatus.getReasonPhrase() != null) { nonNullMsg = httpStatus.getReasonPhrase();
final HttpStatus httpStatus = HttpStatus.getHttpStatus(status); if (httpStatus != null && httpStatus.getReasonPhrase() != null) { nonNullMsg = httpStatus.getReasonPhrase();
final HttpStatus httpStatus = HttpStatus.getHttpStatus(status); if (httpStatus != null && httpStatus.getReasonPhrase() != null) { nonNullMsg = httpStatus.getReasonPhrase();
final HttpStatus httpStatus = HttpStatus.getHttpStatus(status); if (httpStatus != null && httpStatus.getReasonPhrase() != null) { nonNullMsg = httpStatus.getReasonPhrase();
final HttpStatus httpStatus = HttpStatus.getHttpStatus(status); if (httpStatus != null && httpStatus.getReasonPhrase() != null) { nonNullMsg = httpStatus.getReasonPhrase();