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>http://jcenter.bintray.com/</url>
</repository>
<!-- ... -->
<dependency>
  <groupId>khttp</groupId>
  <artifactId>khttp</artifactId>
  <version>0.1.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.

compile "khttp:khttp:0.1.0"

Related Libraries

tekniq

A framework designed around Kotlin providing a full-featured HTTP Framework, Restful HTTP Client, JDBC DSL, Loading Cache, Configurations, Validations, and more

Last updated 3 mins ago

spark-kotlin

A Spark DSL in idiomatic kotlin // dependency - com.sparkjava -spark-kotlin -1.0.0-alpha

Last updated 3 mins ago

kog

🌶 A simple Kotlin web framework inspired by Clojure's Ring.

Last updated 3 mins ago

fuel

The easiest HTTP networking library for Kotlin/Android

Last updated 3 mins ago

khttp

Kotlin HTTP requests library. Similar to Python requests.

Last updated 3 mins ago