diff options
Diffstat (limited to 'webroot/js')
-rw-r--r-- | webroot/js/example.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/webroot/js/example.js b/webroot/js/example.js new file mode 100644 index 0000000..59cf1ee --- /dev/null +++ b/webroot/js/example.js @@ -0,0 +1,14 @@ + +function example_post() { + + var data = { + "key":"value", + } + var json = JSON.stringify(data); + + var xhr = new XMLHttpRequest(); + xhr.open("POST", "api", true); + xhr.send(json); + +} + |