Skip to content

noubug/NouHTTP

Repository files navigation

NouHTTP

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

Version

0.0.4

Tech

NouHTTP has only one dependency GSON v 2.6

Installation

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]'

Usage

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();
                

Development

Want to contribute? Great!

Todos

  • Write Tests
  • Add implementation for PUT,DELETE and UPDATE http methods
  • Add implementation for file upload
  • Add implementation for input stream response

License

Apache 2.0

Free Software!

About

A simple android http client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages