Don't try to parse the empty response body for Delete
This commit is contained in:
parent
83e46f41ef
commit
56e68bc737
1 changed files with 2 additions and 1 deletions
|
@ -13,6 +13,7 @@ module Servant.Client
|
|||
, module Servant.Common.BaseUrl
|
||||
) where
|
||||
|
||||
import Control.Monad
|
||||
import Control.Monad.Trans.Either
|
||||
import Data.Aeson
|
||||
import Data.ByteString.Lazy (ByteString)
|
||||
|
@ -108,7 +109,7 @@ instance HasClient Delete where
|
|||
type Client Delete = BaseUrl -> EitherT String IO ()
|
||||
|
||||
clientWithRoute Proxy req host =
|
||||
performRequestJSON H.methodDelete req 204 host
|
||||
void $ performRequest H.methodDelete req (== 204) host
|
||||
|
||||
-- | If you have a 'Get' endpoint in your API, the client
|
||||
-- side querying function that is created when calling 'client'
|
||||
|
|
Loading…
Reference in a new issue