+ responseListener.getResponseBody());
private String doGET(final String url) throws Exception { JettyResponseListener response = null; try { final ConnectOptions opts = new ConnectOptions(url); opts.method = "GET"; response = m_repo.doConnect(opts); RemoteRepository.checkResponseCode(response); return response.getResponseBody(); } finally { if (response != null) response.abort(); } }
private String doGET(final String url) throws Exception { JettyResponseListener response = null; final ConnectOptions opts = new ConnectOptions(url); opts.method = "GET"; response = doConnect(opts); try { checkResponseCode(url, response); return response.getResponseBody(); } finally { if (response != null) response.abort(); } }
return response.getResponseBody();
log.info(response.getResponseBody()); log.info(response.getResponseBody());
/** * Throw an exception if the status code does not indicate success. * * @param response * The response. * * @return The response. * * @throws IOException */ private static JettyResponseListener checkResponseCode(final String url, final JettyResponseListener response) throws IOException { final int rc = response.getStatus(); if (rc < 200 || rc >= 300) { throw new HttpException(rc, "StatusCode=" + rc + ", StatusLine=" + response.getReason() + ", headers=" + response.getHeaders().toString() + ", ResponseBody=" + response.getResponseBody()); } if (log.isDebugEnabled()) { /* * write out the status list, headers, etc. */ log.debug("*** Response ***"); log.debug("Status Line: " + response.getReason()); } return response; }
final String responseBody = response.getResponseBody();
throw new IOException( "Could not identify format for service response: serviceURI=" + sparqlEndpointURL + ", contentType=" + contentType + " : response=" + response.getResponseBody());
throw new IOException( "Could not identify format for service response: serviceURI=" + opts.getBestRequestURL() + ", contentType=" + contentType + " : response=" + response.getResponseBody()); throw new IOException("No parser for format for service response: serviceURI=" + opts.getBestRequestURL() + ", contentType=" + contentType + ", format=" + format + " : response=" + response.getResponseBody());
private String doGET(final String url) throws Exception { JettyResponseListener response = null; try { final ConnectOptions opts = new ConnectOptions(url); opts.method = "GET"; response = m_repo.doConnect(opts); RemoteRepository.checkResponseCode(response); return response.getResponseBody(); } finally { if (response != null) response.abort(); } }
private String doGET(final String url) throws Exception { JettyResponseListener response = null; final ConnectOptions opts = new ConnectOptions(url); opts.method = "GET"; response = doConnect(opts); try { checkResponseCode(url, response); return response.getResponseBody(); } finally { if (response != null) response.abort(); } }
/** * Throw an exception if the status code does not indicate success. * * @param response * The response. * * @return The response. * * @throws IOException */ private static JettyResponseListener checkResponseCode(final String url, final JettyResponseListener response) throws IOException { final int rc = response.getStatus(); if (rc < 200 || rc >= 300) { throw new HttpException(rc, "StatusCode=" + rc + ", StatusLine=" + response.getReason() + ", headers=" + response.getHeaders().toString() + ", ResponseBody=" + response.getResponseBody()); } if (log.isDebugEnabled()) { /* * write out the status list, headers, etc. */ log.debug("*** Response ***"); log.debug("Status Line: " + response.getReason()); } return response; }
throw new IOException( "Could not identify format for service response: serviceURI=" + opts.getBestRequestURL() + ", contentType=" + contentType + " : response=" + response.getResponseBody());
throw new IOException( "Could not identify format for service response: serviceURI=" + sparqlEndpointURL + ", contentType=" + contentType + " : response=" + response.getResponseBody());
throw new IOException( "Could not identify format for service response: serviceURI=" + opts.getBestRequestURL() + ", contentType=" + contentType + " : response=" + response.getResponseBody());