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,6 +217,10 @@ 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 (RequestBodyBS "" , _) -> Nothing
Just (RequestBodyBS x , _) -> Just $ L.fromStrict x
-- FIXME: not implemented
Just (RequestBodySource _ , _) -> Nothing
Just (RequestBodyLBS "" , _) -> Nothing Just (RequestBodyLBS "" , _) -> Nothing
Just (RequestBodyLBS x , _) -> Just x Just (RequestBodyLBS x , _) -> Just x