WIP: Fix issue #285
This commit is contained in:
parent
69c9ca437a
commit
60f1ddb89e
1 changed files with 1 additions and 0 deletions
|
@ -33,6 +33,7 @@ generateVanillaJSWith opts req = "\n" <>
|
||||||
<> " var xhr = new XMLHttpRequest();\n"
|
<> " var xhr = new XMLHttpRequest();\n"
|
||||||
<> " xhr.open('" <> method <> "', " <> url <> ", true);\n"
|
<> " xhr.open('" <> method <> "', " <> url <> ", true);\n"
|
||||||
<> reqheaders
|
<> reqheaders
|
||||||
|
<> " xhr.setRequestHeader(\"Accept\",\"application/json\");\n"
|
||||||
<> " xhr.onreadystatechange = function (e) {\n"
|
<> " xhr.onreadystatechange = function (e) {\n"
|
||||||
<> " if (xhr.readyState == 4) {\n"
|
<> " if (xhr.readyState == 4) {\n"
|
||||||
<> " var value = JSON.parse(xhr.responseText);\n"
|
<> " var value = JSON.parse(xhr.responseText);\n"
|
||||||
|
|
Loading…
Reference in a new issue