Skip to content

codepath/CPAsyncHttpClient

Repository files navigation

AsyncHttpClient library

Lightweight async HTTP client based on OkHttp. It tries to follow a similar API inspired by this library

Setup

dependencies {
  implementation 'com.codepath.libraries:asynchttpclient:0.0.6'
}

Basic usage

GET:

AsyncHttpClient cp = new AsyncHttpClient();
cp.get("https://api.thecatapi.com/v1/images/search", new TextHttpResponseHandler() {
  @Override
   public void onSuccess(int statusCode, Headers headers, String response) {
     Log.d("DEBUG", response);
   }

   @Override
   public void onFailure(int statusCode, @Nullable Headers headers, String errorResponse, @Nullable Throwable throwable) {
   }
});

About

Android CodePath AsyncHttpClient

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages