Skip to content

Instantly share code, notes, and snippets.

@roh-7
roh-7 / AsyncSnippet.java
Last active September 12, 2018 13:28
snippets i use in app dev
// inside doInBackground.
String urlForList = "<The url here>";
HttpURLConnection httpURLConnection = null;
InputStream inputStream = null;
StringBuilder stringBuilder = new StringBuilder();
try {
URL url = new URL(urlForList);
httpURLConnection = (HttpURLConnection) url.openConnection();