@Override public int getResponseStatus() { if ( responseCode > 0 ) { return responseCode; } return super.getResponseStatus(); }
public int getResponseStatus() { return ce.getResponseStatus(); }
public String processRequest(String url, ContentExchange httpRequest) { ContentExchange httpResponse = sendRequest(url, httpRequest); try { String responseContent = httpResponse.getResponseContent(); int rsc = httpResponse.getResponseStatus(); LOG.info("handleRequest: responseStatus: {}, responseContent: {}", rsc, responseContent); if (rsc < 200 || rsc >= 300) { LOG.error("handleRequest: httpStatusCode: {} ...", rsc); return null; } LOG.info("handleRequest:content: {}", responseContent); return responseContent; } catch (UnsupportedEncodingException e) { LOG.error("get http content exception: {}", e.toString()); } return null; }
try { responseContent = httpResponse.getResponseContent(); rsc = httpResponse.getResponseStatus(); } catch (UnsupportedEncodingException e) { LOG.error("get http content exception: {}", e.toString());
try { responseContent = httpResponse.getResponseContent(); rsc = httpResponse.getResponseStatus(); } catch (UnsupportedEncodingException e) { LOG.error("get http content exception: {}", e.toString());
try { responseContent = httpResponse.getResponseContent(); rsc = httpResponse.getResponseStatus(); } catch (UnsupportedEncodingException e) { LOG.error("get http content exception: {}", e.toString());