NouHTTP is a minimalistic HTTP client for android capable of making post and get requests. I wanted a simple http client for android and tried ION it kept failing on android 4.* < and some samsung devices so I thought to create a simple HttpUrlConnection wrapper. I hope you find it useful
0.0.4
NouHTTP has only one dependency GSON v 2.6
Add the following to your app's build.gradle file
repositories {
maven {
url 'https://dl.bintray.com/eagwasim/maven/'
}
}
Then add the dependency
compile 'com.noubug.lib:nouhttp:[version]'
NouHTTP.with(this)
.get(Constant.BASE_URL + "/_vh/api/poll/get-poll-by-id/" + poll.getPollId())
.addHeader(tokenHeader, apiUser.getToken())
.inTheFuture((e, statusCode, result) -> {
Log.i("TAG", result == null ? "NO RESULT" : result);
if (e == null) {
try {
} catch (Exception e1) {
1.printStackTrace();
}
} else {
e.printStackTrace();
}
}).nou();
Want to contribute? Great!
- Write Tests
- Add implementation for PUT,DELETE and UPDATE http methods
- Add implementation for file upload
- Add implementation for input stream response
Apache 2.0
Free Software!