public static StringBuffer fetchData(final String url, final TrayIcon processTrayIcon) {

		URL obj = null;
		try {
			obj = new URL(url);
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
		URLConnection con = null;
		try {
			if (ApiProperties.get().getUrl().contains("https")) {
				setupConnection();
				con = (HttpsURLConnection) obj.openConnection();
			} else {
				con = (HttpURLConnection) obj.openConnection();
			}
		} catch (IOException e) {
			e.printStackTrace();
		}

		BufferedReader in;
		try {
			InputStream inputStream = con.getInputStream();
			InputStreamReader inR = new InputStreamReader(inputStream);
			in = new BufferedReader(inR);
			String inputLine;
			StringBuffer response = new StringBuffer();
			while ((inputLine = in.readLine()) != null) {
				response.append(inputLine);
			}
			in.close();
			return response;
		} catch (IOException e) {
			// e.printStackTrace();
			processTrayIcon.displayMessage("Connection Error Message", "Could not connect to " + url,
					TrayIcon.MessageType.ERROR);
		}

		return null;
	}