ascclemens / khttp

Kotlin HTTP requests library. Similar to Python requests.

Home Page:http://khttp.readthedocs.org/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

khttp

Travis CI Codecov VersionEye License Gratipay Documentation status

khttp is a simple library for HTTP requests in Kotlin. It functions similarly to Python's requests module.

import khttp.get

fun main(args: Array<out String>) {
    // Get our IP
    println(get("http://httpbin.org/ip").jsonObject.getString("origin"))
    // Get our IP in a simpler way
    println(get("http://icanhazip.com").text)
}

Dependency

Stable

Stable releases are hosted on JCenter.

<repository>
  <id>jcenter</id>
  <url>https://jcenter.bintray.com/</url>
</repository>
<!-- ... -->
<dependency>
  <groupId>khttp</groupId>
  <artifactId>khttp</artifactId>
  <version>1.0.0</version>
</dependency>

Development

Development builds are currently available through JitPack. Snapshot builds may eventually be hosted on OJO, but are not currently available there.

About

Kotlin HTTP requests library. Similar to Python requests.

http://khttp.readthedocs.org/en/latest/

License:Mozilla Public License 2.0


Languages

Language:Kotlin 100.0%