I have a URI in the format:
https://<APIAuthKey>:@domain.com/file.xml?q[]=Query&version=eng
When I use this URL in the browser, it returns an XML file. But on the Android Studio Console, it throws a java.io.FileNotFoundException.
URL uri = new URL(args[0]); HttpURLConnection conn = (HttpURLConnection) uri.openConnection(); conn.setDoInput(true); conn.connect(); InputStream is = conn.getInputStream();
The Code stops execution at conn.connect(); Does anyone know what is going on? Thanks!
Tiada ulasan:
Catat Ulasan