@@ -54,7 +54,7 @@ main :: Effect Unit
5454main = launchAff_ do
5555 { json } <- fetch "https://httpbin.org/post"
5656 { method: POST
57− , body: """{"hello":"world"}"""
57+ , body: writeJSON { hello: "world" }
5858 , headers: { "Content-Type": "application/json" }
5959 }
6060 { json: { hello: world } } :: HttpBinResponse <- fromJSON json
@@ -73,7 +73,7 @@ type HttpBinResponse = { json :: { hello :: String } }
7373do
7474 { json } <- fetch "https://httpbin.org/post"
7575 { method: POST
76− , body: """{"hello":"world"}"""
76+ , body: toJsonString { hello: "world" }
7777 , headers: { "Content-Type": "application/json" }
7878 }
7979 { json: { hello: world } } :: HttpBinResponse <- fromJson json