I wrote some simple code in Java, the method should connect to the website and return the BufferedReader.
private BufferedReader getConnection(String url_a)
In my case url contained wrong chars like spaces . Overall log your url and in some cases use browser.