This repository has been archived by the owner. It is now read-only.
Kotlin HTTP requests library. Similar to Python requests.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 94ddc37 Sep 8, 2017
mb-vsn authored and jkcclemens committed Sep 8, 2017 Support HTTP 307 and HTTP 308 redirects
This commit provides support for following HTTP 307 and HTTP 308
redirects. Specifically, the `URL.openRedirectingConnection` function
(located in `GenericResponse.kt`) was updated to check for the HTTP
response code's presence in an array of redirect response codes
(301, 302, 303, 307, and 308). Previously, the function was only
checking for response codes in the range 301..303.

For information regarding these additional HTTP status codes, see:
  - [307 Temporary Redirect](
  - [308 Permanent Redirect](


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
    // Get our IP in a simpler way



Stable releases are hosted on JCenter.

<!-- ... -->


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