summaryrefslogtreecommitdiffhomepage
path: root/HTTP/Client.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-28 16:40:24 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-28 16:40:24 -0400
commitd149bf03647b09caa2af9e55a392251e4d619640 (patch)
tree6e2f3336d48205041fb515dbdd550a31c16dab22 /HTTP/Client.hs
parent9908ae571c5b4086047443c8560cb65838b0caa2 (diff)
downloadkeysafe-d149bf03647b09caa2af9e55a392251e4d619640.tar.gz
simplify http api, remove apiversion
Not needed since all routes are tagged with the api version.
Diffstat (limited to 'HTTP/Client.hs')
-rw-r--r--HTTP/Client.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/HTTP/Client.hs b/HTTP/Client.hs
index 4a5106b..0a79ba0 100644
--- a/HTTP/Client.hs
+++ b/HTTP/Client.hs
@@ -13,13 +13,11 @@ import Servant.Client
import Data.Proxy
import Network.HTTP.Client (Manager)
-apiVersion :: Manager -> BaseUrl -> ClientM APIVersion
+httpAPI :: Proxy HttpAPI
+httpAPI = Proxy
+
motd :: Manager -> BaseUrl -> ClientM Motd
getObject :: StorableObjectIdent -> Maybe ProofOfWork -> Manager -> BaseUrl -> ClientM (ProofOfWorkRequirement StorableObject)
putObject :: StorableObjectIdent -> Maybe ProofOfWork -> StorableObject -> Manager -> BaseUrl -> ClientM (ProofOfWorkRequirement StoreResult)
countObjects :: Maybe ProofOfWork -> Manager -> BaseUrl -> ClientM (ProofOfWorkRequirement CountResult)
-apiVersion
- :<|> motd
- :<|> getObject
- :<|> putObject
- :<|> countObjects = client (Proxy :: Proxy HttpAPI)
+motd :<|> getObject :<|> putObject :<|> countObjects = client httpAPI