on c8def82 help sign in
servant/src/Servant/Client.hs
17 lines 461 B history raw
1{-# LANGUAGE TypeFamilies #-}
2{-# LANGUAGE OverloadedStrings #-}
3module Servant.Client where
5import Data.Proxy
7import Servant.Common.Req
9-- * Accessing APIs as a Client
11-- | 'client' allows you to produce operations to query an API from a client.
12client :: HasClient layout => Proxy layout -> Client layout
13client p = clientWithRoute p defReq
15class HasClient layout where
16 type Client layout :: *
17 clientWithRoute :: Proxy layout -> Req -> Client layout