Update request body handling

This commit is contained in:
Denis Redozubov 2019-05-17 12:20:27 +03:00
parent 8a76df3a71
commit 619bfaab5b

View file

@ -217,8 +217,12 @@ sendXhr xhr (Just body) = do
toBody :: Request -> Maybe L.ByteString toBody :: Request -> Maybe L.ByteString
toBody request = case requestBody request of toBody request = case requestBody request of
Nothing -> Nothing Nothing -> Nothing
Just (RequestBodyLBS "", _) -> Nothing Just (RequestBodyBS "" , _) -> Nothing
Just (RequestBodyLBS x, _) -> Just x 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 -- * inspecting the xhr response