mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-10-15 19:21:57 +00:00
Use a single js namespace as parent for all other nopaque namespaces.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
var Requests = {};
|
||||
nopaque.requests = {};
|
||||
|
||||
Requests.JSONfetch = (input, init={}) => {
|
||||
nopaque.requests.JSONfetch = (input, init={}) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
let fixedInit = {};
|
||||
fixedInit.headers = {};
|
||||
@@ -8,7 +8,7 @@ Requests.JSONfetch = (input, init={}) => {
|
||||
if (init.hasOwnProperty('body')) {
|
||||
fixedInit.headers['Content-Type'] = 'application/json';
|
||||
}
|
||||
fetch(input, Utils.mergeObjectsDeep(init, fixedInit))
|
||||
fetch(input, nopaque.Utils.mergeObjectsDeep(init, fixedInit))
|
||||
.then(
|
||||
(response) => {
|
||||
if (response.ok) {
|
||||
|
Reference in New Issue
Block a user