tmp-proc-example-0.5.1.2: Shows how to test a simple service using tmp-proc
Copyright(c) 2020-2021 Tim Emiola
LicenseBSD3
MaintainerTim Emiola <adetokunbo@users.noreply.github.com>
Safe HaskellNone
LanguageHaskell2010

TmpProc.Example2.Routes

Description

Specifies the API provided by the demo service.

Synopsis

API route definition

type ContactsAPI = ("contacts" :> (Capture "contactid" ContactID :> Get '[JSON] Contact)) :<|> ("contacts" :> (ReqBody '[JSON] Contact :> Post '[JSON] ContactID)) Source #

API allowing Contact creation and retrieval.

contactsAPI :: Proxy ContactsAPI Source #

For convenience in Servant combinators where a proxy is required.