Kotlin DSL http client


Лицензия

Лицензия

Категории

Категории

Jackson Данные JSON
Группа

Группа

io.github.rybalkinsd
Идентификатор

Идентификатор

kohttp-jackson
Последняя версия

Последняя версия

0.12.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Kotlin DSL http client
Kotlin DSL http client
Ссылка на сайт

Ссылка на сайт

https://github.com/rybalkinsd/kohttp
Организация-разработчик

Организация-разработчик

io.github.rybalkinsd
Система контроля версий

Система контроля версий

https://github.com/rybalkinsd/kohttp

Скачать kohttp-jackson

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.github.rybalkinsd/kohttp-jackson/ -->
<dependency>
    <groupId>io.github.rybalkinsd</groupId>
    <artifactId>kohttp-jackson</artifactId>
    <version>0.12.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.rybalkinsd/kohttp-jackson/
implementation 'io.github.rybalkinsd:kohttp-jackson:0.12.0'
// https://jarcasting.com/artifacts/io.github.rybalkinsd/kohttp-jackson/
implementation ("io.github.rybalkinsd:kohttp-jackson:0.12.0")
'io.github.rybalkinsd:kohttp-jackson:jar:0.12.0'
<dependency org="io.github.rybalkinsd" name="kohttp-jackson" rev="0.12.0">
  <artifact name="kohttp-jackson" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.rybalkinsd', module='kohttp-jackson', version='0.12.0')
)
libraryDependencies += "io.github.rybalkinsd" % "kohttp-jackson" % "0.12.0"
[io.github.rybalkinsd/kohttp-jackson "0.12.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
io.github.rybalkinsd : kohttp jar 0.12.0
com.fasterxml.jackson.core : jackson-databind jar 2.9.9

runtime (2)

Идентификатор библиотеки Тип Версия
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.3.50
com.fasterxml.jackson.module : jackson-module-kotlin jar 2.9.9

Модули Проекта

Данный проект не имеет модулей.

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/POST/PUT/HEAD/DELETE/PATCH requests.

🔹 Asynchronous and blocking requests.

🔹 Upload files.

🔹 Logging - 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

Версии библиотеки

Версия
0.12.0
0.11.1
0.11.0