From: gmungoc Date: Wed, 31 Oct 2018 15:10:22 +0000 (+0000) Subject: JAL-3026 skip unsupported HttpURLConnection methods in JS X-Git-Tag: Release_2_11_4_0~45^2~18^2~436^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7434a5c8bf464bf806a6e88a17bae3f217a5ec68;p=jalview.git JAL-3026 skip unsupported HttpURLConnection methods in JS --- diff --git a/src/jalview/ext/ensembl/EnsemblRestClient.java b/src/jalview/ext/ensembl/EnsemblRestClient.java index f36e111..e3d695f 100644 --- a/src/jalview/ext/ensembl/EnsemblRestClient.java +++ b/src/jalview/ext/ensembl/EnsemblRestClient.java @@ -20,6 +20,7 @@ */ package jalview.ext.ensembl; +import jalview.bin.Jalview; import jalview.io.DataSourceType; import jalview.io.FileParse; import jalview.util.StringUtils; @@ -336,12 +337,15 @@ abstract class EnsemblRestClient extends EnsemblSequenceFetcher getRequestMimeType(multipleIds)); connection.setRequestProperty("Accept", getResponseMimeType()); - connection.setUseCaches(false); connection.setDoInput(true); connection.setDoOutput(multipleIds); - connection.setConnectTimeout(CONNECT_TIMEOUT_MS); - connection.setReadTimeout(readTimeout); + if (!Jalview.isJS()) + { + connection.setUseCaches(false); + connection.setConnectTimeout(CONNECT_TIMEOUT_MS); + connection.setReadTimeout(readTimeout); + } if (multipleIds) {