The Functional Toolkit for Kotlin · Since 2017

Bluestein1 pts0 comments

Home | http4kFrom 1 October 2026, http4k releases reach Maven Central<br>quarterly. maven.http4k.org releases<br>continue every 1-2 weeks.<br>What this means &rarr;<br>From 1 October 2026, http4k distribution is changing.<br>Details &rarr;<br>// THE FUNCTIONAL TOOLKIT FOR KOTLIN · SINCE 2017<br>Server as a Function.<br>We meant it literally.<br>No annotations. No reflection. No container. No magic. Just immutable<br>Kotlin functions you can read, test in-memory in milliseconds, and actually trust in<br>production - from your first endpoint to your hundredth service.<br>Start building<br>See what's new in Pro →<br>6M+ downloads / month<br>200+ modules<br>0 reflection<br>Apache 2.0 core

HelloHttp4k.kt<br>// a server is just a function. that's the whole trick.<br>val app: HttpHandler = { request -><br>Response(OK).body("Hello, " + request.query("name"))

// filters compose behaviours. no magic required.<br>val stack = DebuggingFilters.PrintRequest()<br>.then(ServerFilters.GZip())<br>.then(app)

stack.asServer(SunHttp(9000)).start()<br>// → up in milliseconds. swap with 1 LOC.

http4k - the functional toolkit for Kotlin HTTP applications<br>// MORE THAN A CORE<br>There's a lot going on around here.

News<br>Showcase<br>Supply Chain Security<br>Pro<br>Enterprise<br>Ecosystem<br>LATEST FROM THE TEAM<br>Publishing our homework: what running http4k responsibly actually takes<br>http4k hit the OpenSSF Best Practices silver badge at 100%. Here is the unglamorous work behind it - reporting, change control, signed releases, dependency hygiene - and the one gold criterion we deliberately skip.<br>Read the news &rarr;

news · 2026<br>✓ OpenSSF silver badge · 100%<br>signed releases, threat model, CVD<br>✓ trunk-based by choice

IN ACTION · TALK<br>How Kotlin Powers Functional Design: MCP Edition<br>See http4k's functional approach applied to the Model Context Protocol - building agent tooling in Kotlin, live. Talk, slides and runnable code.<br>Watch the talk &rarr;

talk · 2025<br>✓ MCP Edition · functional design<br>slides · speakerdeck<br>code · kotlinconf.http4k.org

SUPPLY CHAIN · EU CRA 2026<br>Prove your dependencies before they compile<br>Every artifact ships with SLSA L2 provenance, signed SBOMs and cosign signatures. http4k Verify checks them at build time - getting you ahead of the Cyber Resilience Act deadline.<br>Explore Verify &rarr;

build · http4k Verify<br>$ ./gradlew build<br>> Task :verifyHttp4kArtifacts<br>✓ http4k-core sig · sbom · slsa-L2<br>✓ http4k-connect-amazon sig · sbom · slsa-L2<br>✓ all artifacts verified · 0 issues<br>✓ BUILD SUCCESSFUL in 6s

PRO MODULES<br>Premium power tools, same DNA<br>Wiretap, WebAuthn, MCP, X402 and Server Hot Reload - commercially-licensed modules for teams running http4k for real. Free for individuals and small teams.<br>Browse Pro &rarr;

org.http4k.pro<br>Wiretap - trace & debug<br>WebAuthn - passkeys<br>MCP - agent tools<br>Hot Reload - fast feedback<br>X402 - machine payments

ENTERPRISE EDITION<br>Production peace of mind<br>Up to 24 months LTS, priority support from the people who wrote it, source access, signed licence reports and every Pro module - in one subscription.<br>Explore Enterprise &rarr;

LTS · support · provenance<br>✓ 24-month LTS channel<br>✓ Priority Slack & email<br>✓ Signed licence reports<br>✓ All Pro modules included

FOUR ECOSYSTEMS<br>More than just another HTTP library<br>Servers, clients, serverless, formats, templates, security, testing, AI agents and cloud connectors - 200+ modules across Core, AI, Connect and Pro, all built on one functional idea.<br>Explore the ecosystem &rarr;

200+ modules · one BOM<br>http4k-core<br>http4k-connect-amazon-s3<br>http4k-ai-mcp-sdk<br>http4k-security-oauth<br>http4k-format-jackson<br>http4k-testing-approval

Read it. Test it. Trust it.<br>Two function types power the entire toolkit. Everything - routing, auth,<br>clients, serverless - composes from them. What you read is exactly what runs.

CoreTypes.kt<br>the two types<br>// 1. a handler is a function<br>typealias HttpHandler = (Request) -> Response

// 2. a filter wraps a handler<br>typealias Filter = (HttpHandler) -> HttpHandler

AppTest.kt<br>no server, no ports<br>// it's a function - just call it.<br>val res = app(Request(GET, "/?name=ada"))

assertThat(res.status, equalTo(OK))<br>assertThat(res.bodyString(),<br>equalTo("Hello, ada"))<br>// ✓ passes in milliseconds - no server, no @SpringBootTest.

No server required.<br>Your whole stack runs in-memory in a unit test. That's not a testing strategy we bolted<br>on - it's just what happens when your app is a function.

// THE TALE OF THE TAPE<br>How it stacks up against the framework you're escaping.<br>Yes, we're biased. No, we're not wrong. Bring your own benchmarks -<br>ours are in the repo.

In the ring<br>http4k<br>The Usual Framework&trade;

Annotations & reflection<br>Zero<br>Everywhere you look

Framework container<br>What container?<br>Can't start without it

Test the whole app without a server<br>In-memory ✓<br>Spin one up & wait

Move server / platform<br>Change one line<br>Re-architect

Lines to a running "hello"<br>…a starter, a wizard, 4 files

After 9 years running it<br>No regrets<br>…it's complicated

Open source at the core. We built some serious kit on top of it.<br>Premium modules, long-term...

http4k rarr server functional modules kotlin

Related Articles