Popularity
7.4
Declining
Activity
0.8
-
445
20
37

Programming language: Kotlin
License: Apache License 2.0
Tags: Http Clients    
Latest version: v0.12.0

kohttp alternatives and similar libraries

Based on the "Http Clients" category.
Alternatively, view kohttp alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of kohttp or a related project?

Add another 'Http Clients' Library

README

Introduction

Build Status Maven Central codecov Codacy Badge Kotlin Awesome Kotlin Badge Join the chat at https://gitter.im/kohttp/communitystar this repo

Kotlin DSL http client

Features

๐Ÿ”น Developers Experience-driven library without verbosity.

๐Ÿ”น Native way to use http client in Kotlin.

๐Ÿ”น HTTP [GET](gitbook/core/synchronous-calls/get.md)/[POST](gitbook/core/synchronous-calls/post.md)/[PUT](gitbook/core/synchronous-calls/put.md)/[HEAD](gitbook/core/synchronous-calls/head.md)/[DELETE](gitbook/core/synchronous-calls/delete.md)/[PATCH](gitbook/core/synchronous-calls/patch.md) requests.

๐Ÿ”น [Asynchronous](gitbook/core/asynchronous-calls/) and [blocking](gitbook/core/synchronous-calls/) requests.

๐Ÿ”น [Upload files](gitbook/core/synchronous-calls/upload-files.md).

๐Ÿ”น [Logging](gitbook/core/interceptors.md#logging-interceptor-a-request-logging-interceptor) - easily dump your http requests or convert them to cURL commands.

๐Ÿ”น Minimal footprint.

Quick start

// Use String or URL extensions send simple request
val response = "https://my-host.com/users?admin=true".httpGet()

// Parse response with your favorite library
val users = response.toJson()

// Use sync or async methods to send your requests
// Configure method params, headers, cookies and body in a concise way
val notifications: List<Deferred<Response>> = users.forEach { user ->
    httpPostAsync {
        url("https://my-host.com/friends/push")

        param {
            "userId" to user[id]
            "eventType" to NewFriend
        }

        header {
            "locale" to "en_EN"
            cookie {
                "user_session" to "toFycNV"
                "authToken" to "d2dwa6011w96c93ct3e3493d4a1b5c8751563217409"
            }
        }
    }
}

Samples

About kohttp

Installation

Gradle

Kotlin DSL:

implementation(group = "io.github.rybalkinsd", name = "kohttp", version = "0.12.0")

Groovy DSL:

implementation 'io.github.rybalkinsd:kohttp:0.12.0'

Maven:

<dependency>
  <groupId>io.github.rybalkinsd</groupId>
  <artifactId>kohttp</artifactId>
  <version>0.12.0</version>
</dependency>

Table of contents

  • [Synchronous calls](gitbook/core/synchronous-calls/)
    • [GET](gitbook/core/synchronous-calls/get.md)
    • [POST](gitbook/core/synchronous-calls/post.md)
    • [PUT](gitbook/core/synchronous-calls/put.md)
    • [HEAD](gitbook/core/synchronous-calls/head.md)
    • [DELETE](gitbook/core/synchronous-calls/delete.md)
    • [PATCH](gitbook/core/synchronous-calls/patch.md)
    • [Upload files](gitbook/core/synchronous-calls/upload-files.md)
    • [Generic requests](gitbook/core/synchronous-calls/generic-requests.md)
  • [Asynchronous calls](gitbook/core/asynchronous-calls/)
    • [async GET](gitbook/core/asynchronous-calls/async-get.md)
    • [async POST](gitbook/core/asynchronous-calls/async-post.md)
    • [async PUT](gitbook/core/asynchronous-calls/async-put.md)
    • [async HEAD](gitbook/core/asynchronous-calls/async-head.md)
    • [async DELETE](gitbook/core/asynchronous-calls/async-delete.md)
    • [async PATCH](gitbook/core/asynchronous-calls/async-patch.md)
    • [async Upload files](gitbook/core/asynchronous-calls/async-upload-files.md)
    • [async Generic requests](gitbook/core/asynchronous-calls/generic-requests.md)
  • [Response usage](gitbook/core/response-usage.md)
  • [Interceptors](gitbook/core/interceptors.md)
  • [Customisation](gitbook/core/customisation.md)
  • [Experimental features](gitbook/core/experimental-features.md)
  • [Changelog](gitbook/history/changelog.md)