Last active
November 12, 2015 10:57
-
-
Save walteranyika/f3ad3d6b730df972dfad to your computer and use it in GitHub Desktop.
Android Java Code To Fetch Data From A particular URL using AsyncHttpClient library
This file contains hidden or 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
| AsyncHttpClient client=new AsyncHttpClient(); | |
| client.get(URL, new AsyncHttpResponseHandler() | |
| { | |
| @Override | |
| public void onSuccess(int arg0, Header[] arg1, byte[] response) { | |
| String data =new String(response); | |
| } | |
| @Override | |
| public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { | |
| Log.e("DATA", "Error Fetching Data"); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment