Created
November 12, 2010 22:04
-
-
Save jfarcand/674776 to your computer and use it in GitHub Desktop.
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(); | |
TransferCompletionHandler tl = new TransferCompletionHandler(); | |
tl.addTransferListener(new TransferListener() { | |
public void onStart() { | |
} | |
public void onBytesTransfered(ByteBuffer buffer) { | |
// Do something with the bytes | |
} | |
public void onEnd() { | |
} | |
public void onTrowable(Throwable t) { | |
} | |
}); | |
Response response = httpClient.prepareGet("http://...").execute(tl).get(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment