Make GET and POST requests in an Android app with less boilerplate using a reusable callback system.
Upload files or images from an Android app with built-in upload progress reporting.
Download files in the background with cancellable requests tagged by Activity or screen lifecycle.
Study the codebase as a reference for wrapping OkHttp in a simpler interface for legacy Android projects.
Library is no longer maintained, for new projects use OkHttp directly or a current alternative such as Retrofit.
This is an Android library that wraps OkHttp, a popular networking library for Android and Java, to make common HTTP operations simpler and less verbose to write. The repository's description notes that it is no longer actively maintained, so it is primarily of historical or reference interest. OkHttp handles the low-level work of making network requests, but writing the code to handle each type of request, parse the response, track progress, and cancel requests when needed can involve quite a bit of repetitive code. This library provides a cleaner interface on top of OkHttp for the operations that come up most frequently in Android apps: GET requests to fetch data, POST requests to send data, file uploads and downloads, loading images, and sending JSON to a server. A key convenience is the callback system. Instead of writing the same boilerplate error and success handling each time, the library lets you define a callback once and reuse it across requests. Built-in callback types handle plain text responses, file downloads, and image loading as bitmaps. You can also define your own callback type if you want the library to automatically parse a server response into a specific Java object. Other features include progress reporting during uploads and downloads, the ability to cancel individual requests or all requests associated with a specific tag, HTTPS support with options for trusting all certificates or providing a specific one, and session persistence via cookie management. The library also supports HTTP methods beyond GET and POST, including PUT, PATCH, DELETE, and HEAD. The README is written in Chinese and includes code examples for each supported operation. Integration requires adding the library as a dependency in Android Studio or including the jar file manually in Eclipse-based projects.
← hongyangandroid on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.