@@ -123,20 +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
136+ , _reqBodyContentType :: ReqBodyContentType
134 deriving (Data, Eq, Show, Typeable)
138 deriving (Data, Eq, Show, Typeable)
136makeLenses ''Req
140makeLenses ''Req
138defReq :: Req ftype
142defReq :: Req ftype
139−defReq = Req defUrl "GET" [] Nothing Nothing (FunctionName [])
143+defReq = Req defUrl "GET" [] Nothing Nothing (FunctionName []) ReqBodyJSON
141-- | 'HasForeignType' maps Haskell types with types in the target
145-- | 'HasForeignType' maps Haskell types with types in the target
142-- language of your backend. For example, let's say you're
146-- language of your backend. For example, let's say you're