rybalkinsd / Kohttp
Licence: apache-2.0
Kotlin DSL http client
Stars: ✭ 436
Labels
Projects that are alternatives of or similar to Kohttp
Fast Android Networking
🚀 A Complete Fast Android Networking Library that also supports HTTP/2 🚀
Stars: ✭ 5,346 (+1126.15%)
Mutual labels: networking, http-client
Fuel
The easiest HTTP networking library for Kotlin/Android
Stars: ✭ 4,057 (+830.5%)
Mutual labels: networking, http-client
Xmnetworking
A lightweight but powerful network library with simplified and expressive syntax based on AFNetworking.
Stars: ✭ 980 (+124.77%)
Mutual labels: networking, http-client
Poco
The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
Stars: ✭ 5,762 (+1221.56%)
Mutual labels: networking, http-client
Beast
HTTP and WebSocket built on Boost.Asio in C++11
Stars: ✭ 3,241 (+643.35%)
Mutual labels: networking, http-client
Httplib2
Small, fast HTTP client library for Python. Features persistent connections, cache, and Google App Engine support. Originally written by Joe Gregorio, now supported by community.
Stars: ✭ 402 (-7.8%)
Mutual labels: http-client
Django Freeradius
Administration web interface and REST API for freeradius 3 build in django & python, development has moved to openwisp-radius
Stars: ✭ 392 (-10.09%)
Mutual labels: networking
Kelda
Kelda is an approachable way to deploy to the cloud.
Stars: ✭ 433 (-0.69%)
Mutual labels: networking
Async Http Client
HTTP client library built on SwiftNIO
Stars: ✭ 414 (-5.05%)
Mutual labels: http-client
Mobly
E2E test framework for tests with complex environment requirements.
Stars: ✭ 424 (-2.75%)
Mutual labels: networking
Karin
An elegant promise based HTTP client for the browser and node.js [WIP]
Stars: ✭ 393 (-9.86%)
Mutual labels: http-client
Hp Socket
High Performance TCP/UDP/HTTP Communication Component
Stars: ✭ 4,420 (+913.76%)
Mutual labels: networking
Actix Net
A collection of lower-level libraries for composable network services.
Stars: ✭ 415 (-4.82%)
Mutual labels: networking
Malibu
🏄 Malibu is a networking library built on promises
Stars: ✭ 409 (-6.19%)
Mutual labels: networking
Networker
A simple to use TCP and UDP networking library for .NET. Compatible with Unity.
Stars: ✭ 408 (-6.42%)
Mutual labels: networking
Introduction
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
- Kotlin weekly mentioned us
- Android weekly (CN) mentioned us
- Kotlin http client. Making kohttp 0.11.0 - medium post
- Write your Android network as Kotlin DSL - medium post
- Upload files to Google Drive with Kotlin - medium post
- Production Kotlin DSL (RU + subtitles) - Kotlin/Everywhere talk, YouTube
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
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].