public void sendRequest(String resultObject, JSONRPC2Request jsonrpc2Request){
        System.out.println();
        System.out.println("Request: " +jsonrpc2Request.toJSONString());
        String id = jsonrpc2Request.getID().toString();
        URL serverURL = null;

        try {
            if(isDevelopment){
                serverURL = new URL("http://" + InetAddress.getLocalHost().getHostAddress() + ":" + Constants.Http.PORT + "/");
                System.out.println("Client is running in development");
            }else{
                serverURL = new URL("http://" + Constants.General.EXTERNAL_SERVER_IP + ":" + Constants.Http.PORT + "/");
                System.out.println("Client is running in live");
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("ServerURL: " + serverURL.toString());
        JSONRPC2Session mySession = new JSONRPC2Session(serverURL);
        JSONRPC2SessionOptions options = new JSONRPC2SessionOptions();
        options.setConnectTimeout(10000);
        mySession.setOptions(options);

        JSONRPC2Response response = null;
        // Send request
        try {
            response = mySession.send(jsonrpc2Request);
        } catch (JSONRPC2SessionException e) {
            response = handleJSONRPC2Exception(e);
        }


        XStream xstream = new XStream();
        xstream.aliasPackage("models", "core.test.models");
        printResponse(response);
        String xmlString = null;
        Object returnedObject = null;
        xstream.alias("list", LinkedList.class);
        if(response.indicatesSuccess() && ((JSONObject)response.getResult()).get(Constants.Param.Status.STATUS).equals(Constants.Param.Status.SUCCESS)){
            String test;

            if(resultObject != null){
                test = (String) ((JSONObject)response.getResult()).get(resultObject);
                try {
                    xmlString = deSerializeObject(String.class, test);

                    returnedObject =  xstream.fromXML(xmlString);
                } catch (IOException e) {
                    e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                } catch (ClassNotFoundException e) {
                    e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                }
            }
        }
    }