WIP: Fix issue #285

This commit is contained in:
Arian van Putten 2015-12-06 12:22:18 +01:00
parent 69c9ca437a
commit 60f1ddb89e

View File

@ -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"