Skip to content

Instantly share code, notes, and snippets.



Created Mar 28, 2014
What would you like to do?
basicPost = do
r <- post "" (binary "wibble") >>= json
let body = r^.responseBody :: Value
assertEqual "POST succeeds" status200 (r ^. responseStatus)
assertEqual "POST echoes input" (Just "wibble") (body ^? key "data")
assertEqual "POST is binary" (Just "application/octet-stream")
(body ^? key "headers" . key "Content-Type")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment