@@ -3,7 +3,7 @@
33{-# LANGUAGE TypeOperators #-}
44{-# LANGUAGE FlexibleInstances #-}
55{-# LANGUAGE ScopedTypeVariables #-}
6−module Servant.API.JsonBody where
6+module Servant.API.ReqBody where
77
88import Control.Applicative
99import Data.Aeson
@@ -15,12 +15,12 @@ import Servant.Docs
1515import Servant.Server
1616
1717-- * Request Body support
18−data JsonBody a
18+data ReqBody a
1919
2020instance (FromJSON a, HasServer sublayout)
21− => HasServer (JsonBody a :> sublayout) where
21+ => HasServer (ReqBody a :> sublayout) where
2222
23− type Server (JsonBody a :> sublayout) =
23+ type Server (ReqBody a :> sublayout) =
2424 a -> Server sublayout
2525
2626 route Proxy subserver request respond = do
@@ -30,9 +30,9 @@ instance (FromJSON a, HasServer sublayout)
3030 Just v -> route (Proxy :: Proxy sublayout) (subserver v) request respond
3131
3232instance (ToJSON a, HasClient sublayout)
33− => HasClient (JsonBody a :> sublayout) where
33+ => HasClient (ReqBody a :> sublayout) where
3434
35− type Client (JsonBody a :> sublayout) =
35+ type Client (ReqBody a :> sublayout) =
3636 a -> Client sublayout
3737
3838 clientWithRoute Proxy req body =
@@ -40,7 +40,7 @@ instance (ToJSON a, HasClient sublayout)
4040 setRQBody (encode body) req
4141
4242instance (ToSample a, HasDocs sublayout)
43− => HasDocs (JsonBody a :> sublayout) where
43+ => HasDocs (ReqBody a :> sublayout) where
4444
4545 docsFor Proxy (endpoint, action) =
4646 docsFor sublayoutP (endpoint, action')