I'm trying to get basic JSON communication from client to server going, with the following Elm code:

import open Http result res = case res of Success a -> a Waiting -> "Waiting" Failure n a-> "Failure " ++ (show n) ++ " " ++ (show a) main = lift asText <| lift (show . result) <| send <| constant <| post "http://localhost:3000" "{foo : true}"

The server is exactly as shown in this part of the Yesod book.

However, when I run the request, I get the output

"\"Failure 0 []\""

Does anybody know what I have to do to get an Elm client properly communicating with a Yesod server? I've tried a Python client, and the requests work just fine. Likewise, there are several examples on the Yesod site with successful Http requests, so I'm confident both libraries are working properly, but that I'm using them wrong.

UPDATE: The problem is client-side. I was able to get it working with chrome with security options disabled, and no changes to Yesod. I'll look for a workaround, but this is at least enough to let my development continue.