Popularity
4.6
Growing
Activity
0.0
Stable
4
3
1
Monthly Downloads: 3
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Latest version: v0.1.1
servant-match alternatives and similar packages
Based on the "servant" category.
Alternatively, view servant-match alternatives based on common mentions on social networks and blogs.
-
servant-purescript
Generate PureScript accessor functions for you servant API -
servant-auth-cookie
Authentication via encrypted cookies -
servant-aeson-specs
generic tests for aeson serialization in servant -
servant-github-webhook
Servant combinators to facilitate writing GitHub webhooks. -
servant-matrix-param
Matrix parameter combinator for servant -
servant-pagination
Type-safe pagination for Servant APIs -
servant-auth-token-acid
Acid-state backend for servant-auth-token server -
servant-auth-token-leveldb
Leveldb backend for servant-auth-token server -
servant-exceptions
Extensible exceptions for servant APIs -
servant-zeppelin
Types and definitions of servant-zeppelin combinators. -
servant-zeppelin-client
Client library for servant-zeppelin combinators. -
servant-http2-client
Generate HTTP2 clients from Servant API descriptions. -
servant-haxl-client
automatical derivation of querying functions for servant webservices -
servant-generate
Utilities for generating mock server implementations -
servant-proto-lens
Servant Content-Type for proto-lens protobuf modules. -
servant-multipart
multipart/form-data (e.g file upload) support for servant
Get performance insights in less than 4 minutes
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
Do you think we are missing an alternative of servant-match or a related project?
README
servant-match
This package provides a standalone implementation of dispatching a
function by matching it against a Servant API. A common usecase for
this is to convert an URI
to an ADT that provides a more structured
representation of the URL.
Usage
data DataView
= Show
| Edit
deriving (Show, Eq)
data View
= ViewUsers
| ViewNewUser
| ViewUser !Text !DataView
deriving (Show, Eq)
data User = User
type API =
"users" :> (Get '[JSON] [User] :<|> "new" :> ReqBody '[JSON] User :> Post '[JSON] User) :<|>
"user" :> Capture "user" Text :>
(Get '[JSON] User :<|>
"edit" :> ReqBody '[JSON] User :> Put '[JSON] User)
parser :: MatchT API View
parser =
(ViewUsers :<|> ViewNewUser) :<|> (\u -> ViewUser u Show :<|> ViewUser u Edit)