Set a content-type header for json posts
This commit is contained in:
parent
5ea31a7050
commit
a99f364fb9
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue