http4s

A typeful, purely functional, streaming library for HTTP clients and servers in Scala.

Get started

Typeful

http4s uses Scala’s type system to increase self-documentation and compile-time verification. Standard headers are lazily parsed to semantically meaningful types, and typeclasses are provided to encode and decode bodies to several common formats.

Purely functional

The pure functional side of Scala is favored to promote composability and easy reasoning about your code. The core is built on an immutable case class model of HTTP requests and responses, shared by the client and the server.

Streaming

http4s is built on scalaz-streams, which provides the foundation for processing and emitting large payloads in constant space and implementing websockets.

A port from scalaz-stream to fs2 and cats is in progress.