servant-server

A family of combinators for defining webservices APIs and serving them

http://haskell-servant.github.io/

Version on this page:0.6.1
LTS Haskell 22.18:0.20@rev:4
Stackage Nightly 2024-04-22:0.20@rev:4
Latest on Hackage:0.20@rev:4

See all snapshots servant-server appears in

BSD-3-Clause licensed by Servant Contributors
Maintained by [email protected]
This version can be pinned in stack with:servant-server-0.6.1@sha256:d5a9e86174f304853fac91d245755beea94300d7b55045eb45d8ce65d9959a91,4475

servant-server

servant

This library lets you implement an HTTP server with handlers for each endpoint of a servant API, handling most of the boilerplate for you.

Getting started

We’ve written a tutorial guide that introduces the core types and features of servant. After this article, you should be able to write your first servant webservices, learning the rest from the haddocks’ examples.

Changes

0.6

  • Query parameters that can’t be parsed result in a 400 (was 404).

0.5

  • Add Config machinery (https://github.com/haskell-servant/servant/pull/327). This is a breaking change, as the signatures of both route, serve and the typeclass HasServer now take an additional parameter.
  • Support for the HttpVersion, IsSecure, RemoteHost and Vault combinators
  • Drop EitherT in favor of ExceptT
  • Use http-api-data instead of Servant.Common.Text
  • Remove matrix params.
  • Remove RouteMismatch.
  • Redefined constructors of RouteResult.
  • Added Delayed and related functions (addMethodCheck, addAcceptCheck, addBodyCheck, runDelayed)
  • Added support for Basic Authentication
  • Add generalized authentication support via the AuthServerData type family and AuthHandler handler

0.4.1

  • Bump attoparsec upper bound to < 0.14
  • Bump wai-app-static upper bound to < 3.2
  • Bump either upper bound to < 4.5

0.4

0.2.4

0.2.3