diff --git a/servant-js/src/Servant/JS/Vanilla.hs b/servant-js/src/Servant/JS/Vanilla.hs index 7313f540..89ef91d5 100644 --- a/servant-js/src/Servant/JS/Vanilla.hs +++ b/servant-js/src/Servant/JS/Vanilla.hs @@ -33,6 +33,7 @@ generateVanillaJSWith opts req = "\n" <> <> " var xhr = new XMLHttpRequest();\n" <> " xhr.open('" <> method <> "', " <> url <> ", true);\n" <> reqheaders + <> " xhr.setRequestHeader(\"Accept\",\"application/json\");\n" <> " xhr.onreadystatechange = function (e) {\n" <> " if (xhr.readyState == 4) {\n" <> " var value = JSON.parse(xhr.responseText);\n"