From: Charles Ofoegbu Date: Mon, 20 Oct 2014 09:39:17 +0000 (+0100) Subject: Removed dependency for Jersey webservice lib and updated code to use HttpClientUtils... X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f4ce96548d478b01489f7a9157badb6efb1362bd;p=jalview.git Removed dependency for Jersey webservice lib and updated code to use HttpClientUtils class. --- diff --git a/src/jalview/ws/intermine/IntermineFetchClient.java b/src/jalview/ws/intermine/IntermineFetchClient.java index 535959f..321bb85 100644 --- a/src/jalview/ws/intermine/IntermineFetchClient.java +++ b/src/jalview/ws/intermine/IntermineFetchClient.java @@ -4,16 +4,12 @@ import jalview.ws.HttpClientUtils; import java.io.IOException; -import javax.ws.rs.core.MultivaluedMap; - import org.apache.http.client.ClientProtocolException; -import com.sun.jersey.api.client.Client; public class IntermineFetchClient { - private static final Client client = Client.create(); public static enum IntermineDB { @@ -78,26 +74,6 @@ public class IntermineFetchClient } - public static String fetchData(IntermineDB Database, - IntermineMethod method, MultivaluedMap params) - { - String response = ""; - if (params.isEmpty()) - { - - response = client.resource(Database.getURL() + method.getTarget()) - .accept("text/plain") - .get(String.class); - - } - else - { - response = client.resource(Database.getURL() + method.getTarget()) - .queryParams(params) - .get(String.class); - } - return response; - } public static String fetchData(String url) throws ClientProtocolException, IOException