on master help sign in
Don't try to parse the empty response body for Delete
56e68bcTimo von Holtz
src/Servant/Client.hs+2−1
@@ -13,6 +13,7 @@ module Servant.Client
13 , module Servant.Common.BaseUrl
13 , module Servant.Common.BaseUrl
14 ) where
14 ) where
15
15
16+import Control.Monad
16import Control.Monad.Trans.Either
17import Control.Monad.Trans.Either
17import Data.Aeson
18import Data.Aeson
18import Data.ByteString.Lazy (ByteString)
19import Data.ByteString.Lazy (ByteString)
@@ -108,7 +109,7 @@ instance HasClient Delete where
108 type Client Delete = BaseUrl -> EitherT String IO ()
109 type Client Delete = BaseUrl -> EitherT String IO ()
109
110
110 clientWithRoute Proxy req host =
111 clientWithRoute Proxy req host =
111− performRequestJSON H.methodDelete req 204 host
112+ void $ performRequest H.methodDelete req (== 204) host
112
113
113-- | If you have a 'Get' endpoint in your API, the client
114-- | If you have a 'Get' endpoint in your API, the client
114-- side querying function that is created when calling 'client'
115-- side querying function that is created when calling 'client'