How to call querybuilder API in Java. I have tried this but i am getting no result. But when i am trying to hit in browser with this URL localhost path then the response is coming properly.
URL url = new URL("http://localhost:4502/bin/querybuilder.json?path=/content");
HttpURLConnection servletConnection = (HttpURLConnection) url.openConnection();
servletConnection.setRequestMethod("GET");
servletConnection.setDoOutput(true);
InputStream response = servletConnection.getInputStream();