Update request body handling
This commit is contained in:
parent
8a76df3a71
commit
619bfaab5b
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue