search
Get Started
search
http4k - Framework
zoom_in Click to enlarge

http4k

language

description http4k Overview

http4k is an open-source HTTP toolkit written in Kotlin that allows developers to build HTTP servers and clients using functional programming principles. It models HTTP concepts as pure Kotlin functions, enabling type-safe routing and processing. The framework is designed for engineers who prefer test-driven development and functional paradigms in their backend applications. It supports multiple underlying server technologies while maintaining a consistent core API.

help http4k FAQ

How does http4k use the same model for HTTP servers and clients?

At its core, an http4k handler is a Kotlin function that maps a Request to a Response. That small interface can be invoked in memory during tests or attached to server and client adapters for real network traffic.

What are lenses in http4k?

Lenses extract and validate typed values from HTTP messages and can inject values back into them. They let Kotlin code work with a header, path parameter, query value, or body as a known type instead of repeatedly parsing strings.

Can http4k generate OpenAPI documentation?

Yes. Its contract-routing modules can attach request, response, and security metadata to routes and generate OpenAPI descriptions. The same typed lenses used by handlers help define what the resulting API contract accepts.

When would a Kotlin team choose http4k instead of Ktor or Spring Boot?

http4k suits teams that want explicit functional composition, minimal core dependencies, and tests that can call handlers without starting a container. Ktor offers a broader Kotlin server framework, while Spring Boot supplies a much larger dependency-injection and application ecosystem.

Reviews & Comments

Write a Review

rate_review

Be the first to review

Share your thoughts with the community and help others make better decisions.

Save to your list

Save your favorites and follow how their scores change over time.

Save favorites
Track changes
Compare scores

Already have an account? Sign in

Compare Items

See how they stack up against each other

Comparing
VS
Select 1 more item to compare