@@ -123,21 +123,24 @@ defUrl = Url [] []
124makeLenses ''Url
124makeLenses ''Url
126+data ReqBodyContentType = ReqBodyJSON | ReqBodyMultipart
127+ deriving (Data, Eq, Show, Read)
126data Req f = Req
129data Req f = Req
127− { _reqUrl :: Url f
130+ { _reqUrl :: Url f
128− , _reqMethod :: HTTP.Method
131+ , _reqMethod :: HTTP.Method
129− , _reqHeaders :: [HeaderArg f]
132+ , _reqHeaders :: [HeaderArg f]
130− , _reqBody :: Maybe f
133+ , _reqBody :: Maybe f
131− , _reqReturnType :: Maybe f
134+ , _reqReturnType :: Maybe f
132− , _reqFuncName :: FunctionName
135+ , _reqFuncName :: FunctionName
133− , _reqBodyIsJSON :: Bool
136+ , _reqBodyContentType :: ReqBodyContentType
135 deriving (Data, Eq, Show, Typeable)
138 deriving (Data, Eq, Show, Typeable)
137makeLenses ''Req
140makeLenses ''Req
139defReq :: Req ftype
142defReq :: Req ftype
140−defReq = Req defUrl "GET" [] Nothing Nothing (FunctionName []) True
143+defReq = Req defUrl "GET" [] Nothing Nothing (FunctionName []) ReqBodyJSON
142-- | 'HasForeignType' maps Haskell types with types in the target
145-- | 'HasForeignType' maps Haskell types with types in the target
143-- language of your backend. For example, let's say you're
146-- language of your backend. For example, let's say you're