diff --git a/servant-client-jsaddle/src/Servant/Client/Internal/JSaddleXhrClient.hs b/servant-client-jsaddle/src/Servant/Client/Internal/JSaddleXhrClient.hs index 2753ad90..136b2e15 100644 --- a/servant-client-jsaddle/src/Servant/Client/Internal/JSaddleXhrClient.hs +++ b/servant-client-jsaddle/src/Servant/Client/Internal/JSaddleXhrClient.hs @@ -217,8 +217,12 @@ sendXhr xhr (Just body) = do toBody :: Request -> Maybe L.ByteString toBody request = case requestBody request of Nothing -> Nothing - Just (RequestBodyLBS "", _) -> Nothing - Just (RequestBodyLBS x, _) -> Just x + Just (RequestBodyBS "" , _) -> Nothing + Just (RequestBodyBS x , _) -> Just $ L.fromStrict x + -- FIXME: not implemented + Just (RequestBodySource _ , _) -> Nothing + Just (RequestBodyLBS "" , _) -> Nothing + Just (RequestBodyLBS x , _) -> Just x -- * inspecting the xhr response