private final static long VERSION_RETEST_INTERVAL = 1000L * 3600; // 1 hr
+ protected static final String CONTENT_TYPE_JSON = "?content-type=application/json";
+
static
{
domainData = new HashMap<String, EnsemblInfo>();
{
// note this format works for both ensembl and ensemblgenomes
// info/ping.json works for ensembl only (March 2016)
- URL ping = new URL(
- getDomain() + "/info/ping?content-type=application/json");
+ URL ping = new URL(getDomain() + "/info/ping" + CONTENT_TYPE_JSON);
/*
* expect {"ping":1} if ok
URL url = null;
try
{
- url = new URL(
- getDomain() + "/info/rest?content-type=application/json");
+ url = new URL(getDomain() + "/info/rest" + CONTENT_TYPE_JSON);
BufferedReader br = getHttpResponse(url, null);
if (br == null)
{
URL url = null;
try
{
- url = new URL(
- getDomain() + "/info/data?content-type=application/json");
+ url = new URL(getDomain() + "/info/data" + CONTENT_TYPE_JSON);
BufferedReader br = getHttpResponse(url, null);
if (br != null)
{