* update these constants when Jalview has been checked / updated for
* changes to Ensembl REST API
* @see https://github.com/Ensembl/ensembl-rest/wiki/Change-log
+ * @see http://rest.ensembl.org/info/rest?content-type=application/json
*/
private static final String LATEST_ENSEMBLGENOMES_REST_VERSION = "4.6";
- private static final String LATEST_ENSEMBL_REST_VERSION = "4.6";
+ private static final String LATEST_ENSEMBL_REST_VERSION = "4.7";
private static final String REST_CHANGE_LOG = "https://github.com/Ensembl/ensembl-rest/wiki/Change-log";
URL url = getUrl(ids);
BufferedReader reader = getHttpResponse(url, ids);
+ if (reader == null)
+ {
+ // request failed
+ return null;
+ }
FileParse fp = new FileParse(reader, url.toString(), "HTTP_POST");
return fp;
}
* note: a GET request for an invalid id returns an error code e.g. 415
* but POST request returns 200 and an empty Fasta response
*/
- throw new IOException(
- "Response code was not 200. Detected response was "
- + responseCode);
+ System.err.println("Response code " + responseCode + " for " + url);
+ return null;
}
// get content
InputStream response = connection.getInputStream();