Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/http4k/http4k
The Functional toolkit for Kotlin HTTP applications. http4k provides a simple and uniform way to serve, consume, and test HTTP services.
https://github.com/http4k/http4k
http http-client http-server http4k immutability kotlin tdd testability typesafe
Last synced: 5 days ago
JSON representation
The Functional toolkit for Kotlin HTTP applications. http4k provides a simple and uniform way to serve, consume, and test HTTP services.
- Host: GitHub
- URL: https://github.com/http4k/http4k
- Owner: http4k
- License: apache-2.0
- Created: 2017-03-23T22:28:13.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-28T09:23:46.000Z (3 months ago)
- Last Synced: 2024-10-29T13:41:25.611Z (2 months ago)
- Topics: http, http-client, http-server, http4k, immutability, kotlin, tdd, testability, typesafe
- Language: Kotlin
- Homepage: https://http4k.org
- Size: 26.9 MB
- Stars: 2,614
- Watchers: 28
- Forks: 249
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
- Support: SUPPORT.md
Awesome Lists containing this project
- awesome-kotlin - http4k - The Functional toolkit for Kotlin HTTP applications. http4k provides a simple and uniform way to serve, consume, and test HTTP services. (Libraries)
- awesome-kotlin-android - http4k - HTTP ε·₯ε ·ε π₯π₯π₯π₯ (εΌζΊεΊ / η½η»)
README
[http4k] is a lightweight but fully-featured HTTP toolkit written in pure [Kotlin](https://kotlinlang.org/) that enables the serving and consuming of HTTP
services in a functional and consistent way. [http4k] applications are *just* Kotlin functions. For example, here's a simple echo server:```kotlin
val app: HttpHandler = { request: Request -> Response(OK).body(request.body) }
val server = app.asServer(SunHttp(8000)).start()
```You can read about the rationale and ethos of http4k [here](https://http4k.org/rationale)
The [http4k] platform consists of the following main ecosystems, all released under a single version:
- [http4k-core](./core) consists of a lightweight core library providing a base HTTP implementation and Server/Client implementations based on the JDK classes. Further servers, clients, serverless, templating, websockets capabilities are then implemented in add-on modules. [http4k] apps can be simply mounted into a running Server, Serverless platform, or compiled to GraalVM and run as a super-lightweight binary.
- [http4k-connect](./connect) is a lightweight API Client toolkit which includes libraries for connecting to popular third-party cloud
services and AI backends using [http4k](https://http4k.org) compatible APIs, along with Fake implementations for usage during local
testing.Sounds cool! Where can I find out more?
You can find out all about the project on the [http4k] site.
## Installation
```kotlin
dependencies {
// install the platform...
implementation(platform("org.http4k:http4k-bom:"))// ...then choose any moduless but at least the core
implementation("org.http4k:http4k-core")
}
```## Acknowledgments
* [Dan Bodart](https://twitter.com/DanielBodart)'s **utterlyidle**
* Ivan Moore for pairing on the original hackday project - Barely Magical.
* You can see the amazing people and companies who have helped us to make http4k [here](https://http4k.org/community).[http4k]: https://http4k.org