Copyright | (c) 2017 Quixoftic LLC |
---|---|
License | BSD3 |
Maintainer | Drew Hess <dhess-src@quixoftic.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
This module provides client-side actions for interacting with the
server-side MellonAPI
.
The client actions are implemented on top of the Network.HTTP.Client and Servant.Client modules.
Client actions
These actions take a Manager
and a BaseUrl
, and
should then be run in an ExceptT
transformer stack to
produce a result. For example, assuming the service
endpoint is http://localhost:8081/
:
> let baseUrl = BaseUrl Http "localhost" 8081 "" > manager <- newManager defaultManagerSettings > runExceptT $ putState Locked manager baseUrl Right Locked
getTime :: ClientM Time Source #
Get the server's time. This action is provided chiefly to verify the accuracy of the server's clock.
Server types
Re-exported for convenience.
Mimics State
, but provides JSON conversions.
(Avoids orphan instances.)
A newtype wrapper around UTCTime
, for serving HTML without
orphan instances.