Skip to content

Instantly share code, notes, and snippets.

@jfarcand
Created November 30, 2010 13:21
Show Gist options
  • Save jfarcand/721660 to your computer and use it in GitHub Desktop.
Save jfarcand/721660 to your computer and use it in GitHub Desktop.
@Test(groups = "standalone")
public void basicTest() throws Throwable {
AsyncHttpClient c = new AsyncHttpClient();
ResumableAsyncHandler<Response> a = new ResumableAsyncHandler<Response>(new PropertiesBasedResumableProcessor());
a.setResumableListener(new ResumableRandomAccessFileHandler(new RandomAccessFile("shrek1.avi", "rw")));
Response r = c.prepareGet("http://192.168.2.106:8081/shrek1.AVI").execute(a).get();
assertEquals(r.getStatusCode(), 200);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment