Created
November 12, 2019 17:20
-
-
Save matthewmorrone/871b2e1529cee56c03d41f741d0e7123 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static InputStream getInputStreamFromUrl(String url) { | |
InputStream content = null; | |
try { | |
HttpClient httpclient = new DefaultHttpClient(); | |
HttpResponse response = httpclient.execute(new HttpGet(url)); | |
content = response.getEntity().getContent(); | |
} catch (Exception e) { | |
Log.("[GET REQUEST]", "Network exception", e); | |
} | |
return content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment