private String getJsonString(String url, String... params ) {

		try {
			//Inject parameters into URL.
			url = String.format(url, params);
			url = url.replaceAll("\\s","");
			// connecting to restAPI
			HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
			conn.setRequestMethod("GET");
			conn.setRequestProperty("Accept", "application/json");

			// If connection successful
			if (conn.getResponseCode() != 200) {
				throw new RuntimeException("Failed : HTTP error code : " + conn.getResponseCode());
			}
			InputStreamReader input = new InputStreamReader((conn.getInputStream()));
			
			br = new BufferedReader(input);
			String line = null;
			StringBuffer json = new StringBuffer();
			while((line=br.readLine())!=null){
			   json.append(line+"\n");
			}
			br.close();
			conn.disconnect();
			
			return json.toString();

		} catch (MalformedURLException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return "";
	}