module Network.HTTP.Lucu.Request
( Method(..)
, Request(..)
- , reqMustHaveBody
+ , reqHasBody
)
where
import Control.Applicative
{-# INLINE setHeaders #-}
setHeaders req hdr = req { reqHeaders = hdr }
--- |Returns 'True' iff the 'Request' must have an entity body.
-reqMustHaveBody ∷ Request → Bool
-{-# INLINEABLE reqMustHaveBody #-}
-reqMustHaveBody (reqMethod → m)
+-- |Returns 'True' iff the 'Request' would have an entity body.
+reqHasBody ∷ Request → Bool
+{-# INLINEABLE reqHasBody #-}
+reqHasBody (reqMethod → m)
| m ≡ POST = True
| m ≡ PUT = True
| otherwise = False