Add record to Req type
This is needed for servant-js to know whether to call JSON.stringify() on the request body or just send it raw.
This commit is contained in:
parent
af7ba3d6b8
commit
62def38a9b
3 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
name: servant-foreign
|
||||
version: 0.11.1
|
||||
version: 0.11.2
|
||||
x-revision: 3
|
||||
synopsis: Helpers for generating clients for servant APIs in any programming language
|
||||
description:
|
||||
|
|
|
@ -21,6 +21,7 @@ module Servant.Foreign
|
|||
, reqMethod
|
||||
, reqHeaders
|
||||
, reqBody
|
||||
, reqBodyIsJSON
|
||||
, reqReturnType
|
||||
, reqFuncName
|
||||
, path
|
||||
|
|
|
@ -130,13 +130,14 @@ data Req f = Req
|
|||
, _reqBody :: Maybe f
|
||||
, _reqReturnType :: Maybe f
|
||||
, _reqFuncName :: FunctionName
|
||||
, _reqBodyIsJSON :: Bool
|
||||
}
|
||||
deriving (Data, Eq, Show, Typeable)
|
||||
|
||||
makeLenses ''Req
|
||||
|
||||
defReq :: Req ftype
|
||||
defReq = Req defUrl "GET" [] Nothing Nothing (FunctionName [])
|
||||
defReq = Req defUrl "GET" [] Nothing Nothing (FunctionName []) True
|
||||
|
||||
-- | 'HasForeignType' maps Haskell types with types in the target
|
||||
-- language of your backend. For example, let's say you're
|
||||
|
|
Loading…
Reference in a new issue