Skip to content
This repository was archived by the owner on Feb 12, 2019. It is now read-only.

Karn/khttp-rxjava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KHttp Extensions for RxJava

Kotlin RxJava KHttp Build Status Current Release

Reactive extensions for KHttp

GETTING STARTED

You can install these reactive extensions using Jitpack.

Currently there is only a snapshot available as test coverage is improved.

// Project level build.gradle
// ...
repositories {
    maven { url 'https://jitpack.io' }
}
// ...

// Module level build.gradle
dependencies {
    // or 'compile' if in Java-land.
    implementation "com.github.karn:khttp-rxjava:-SNAPSHOT"
}
USAGE

The most basic case is as follows:

get("http://httpbin.org/get")
    .subscribe { response: Response?, error: Throwable? ->
        if (error != null) {
            // Handle Error here
            return@subscribe
        }

        when (response?.statusCode) {
            200 -> System.out.print("Status OK")
            else -> System.out.print("Status not OK.")
        }
    }
CONTRIBUTING

There are many ways to contribute, you can

  • submit bugs,
  • help track issues,
  • review code changes.

About

Reactive extensions for KHttp.

Topics

Resources

License

Code of conduct

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages