The Functional toolkit for Kotlin HTTP applications

http4k provides a simple and uniform way to serve, consume, and test HTTP services.

Quick Start

HTTP as a Function

Creating a server with http4k

An http4k server is just a regular function that gets invoked with a Request and returns a Response.

In a single line of code you can switch your server between Java (built-in), Apache, Jetty, Netty, Undertow, Ktor, Ratpack or Helidon.

Creating a client with http4k

An http4k client is just a regular function that you invoke with a Request and receives a Response.

In a single line of code you can switch your client implementation between Java (built-in), Apache, Fuel, Jetty, and OkHttp.

Highlights

footprint

Tiny
footprint

The core library has no dependencies and it’s all you need to create fully-functional applications.

http4k APIs take advantage of Kotlin features and are powered by Functional Programming techniques.

extendable

Highly
extendable

Supports many Server, Serverless and HTTP Client technologies behind simple, consistent interfaces.

http4k provides over 100 pre-built integrations for developers to choose from including Observability, JSON, and OpenAPI support.

testability

First class
testability

Create lightning fast, rock solid test suites for individual endpoints, applications or multi-service systems, all running fully in-memory.

http4k embraces advanced testing approaches such as Approval, Chaos and Service Virtualization.

supportive

Battle-tested
in the wild

http4k takes advantage of technologies that have millions of hours of production runtime.

The toolkit has been used to build high volume applications in Banking, Publishing & Government projects.

More than 100 integrations

http4k integrates with many tools, libraries and APIs for building Cloud-Native applications.

Check it out

Corporate partners

http4k works with selected companies to fund and explore continued innovation around the project. If your organisation is using http4k and would like to take advantage of this program, please get in touch.

Springer Nature Technology
Kotlin Foundation

Professional Services

support

Support

It’s important to us that you can rely on your core dependencies for the long term. That’s why we offer Long Term Support packages (LTS) for http4k releases.

faq

Solve

We’ve designed http4k to be simple to work with, but getting professional advice about effectively using it from specialist experts can 🚀 your projects.

training

Educate

We provide hands-on training to help you get the most out of http4k. You can get help from the creators of http4k to learn how to use it effectively.

pumb