http4s is a typeful, purely functional HTTP library for client and server applications written in Scala.
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.
Asynchronous: Much of the API is built around a
scalaz.concurrent.Task. Bodies are modeled as
scalaz-streams for performant chunking of large
messages in constant memory.
Modular: http4s has a lightweight core with multiple deployment options. Server applications can be deployed to blaze, the native platform, or as a servlet application. Client applications run on either blaze or an async-http-client backend. Several libraries useful in everyday HTTP programming, such as circe and argonaut, are integrated via optional modules.
Community-oriented: http4s is a community-driven project, and aims to provide a welcoming environment for all users. We are proud to be a Typelevel incubator project. Please see our community page to learn how you can participate.
Please pick a version that suits your needs, and proceed to its tutorial:
|0.15.0a-SNAPSHOT||Stable||docs/0.15||2.12.x, 2.11.x, 2.10.x||7.2.x||0.8.4a||1.8+|
|0.15.0-SNAPSHOT||Stable||docs/0.15||2.12.x, 2.11.x, 2.10.x||7.1.x||0.8.4||1.8+|
Stable releases are recommended for production use, and receive backward, binary-compatible bugfixes from the http4s team.
Development releases are published as snapshots to Sonatype by CI.
EOL releases are not actively maintained by the http4s team, but patches will be considered.