Set a content-type header for json posts

This commit is contained in:
mmcwilliams 2017-11-21 16:59:22 -05:00
parent 5ea31a7050
commit a99f364fb9
1 changed files with 2 additions and 0 deletions

View File

@ -392,6 +392,7 @@
<script>
'use strict'
const web = {};
web._header = new Headers({ 'content-type' : 'application/json' })
web.frame = function () {
$.ajax({
method : 'POST',
@ -414,6 +415,7 @@
console.log('set to => ' + dir)
const opts = {
method : 'POST',
headers : web._header,
body : JSON.stringify({ dir : dir })
};
console.dir(opts)