[Fix] reset ajax headers after XML upload

This commit is contained in:
Robert von Burg 2018-09-10 14:31:29 +02:00
parent 352c221b08
commit 901f56c48d
2 changed files with 16 additions and 1 deletions

View File

@ -548,6 +548,9 @@
}
this.$.ajax.handleAs = 'text';
this.$.ajax.headers = {
'Accept': 'application/json'
};
this.$.ajax.method = 'DELETE';
this.$.ajax.generateRequest();
}

View File

@ -360,6 +360,11 @@
this.$.ajax.url = this.basePath + 'rest/strolch/inspector';
this.$.ajax.method = 'GET';
this.$.ajax.headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
};
this.$.ajax.generateRequest();
},
@ -406,7 +411,6 @@
'Accept': 'application/xml',
'Content-Type': 'application/xml'
};
this.$.ajax.handleAs = 'json';
this.$.ajax.method = 'POST';
this.$.ajax.body = this.modelAsText;
this.$.ajax.generateRequest();
@ -452,6 +456,10 @@
this.$.ajax.url = this.basePath + 'rest/strolch/inspector/' + this.selectedRealm;
this.$.ajax.method = 'GET';
this.$.ajax.headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
};
this.$.ajax.generateRequest();
},
@ -488,6 +496,10 @@
this.$.ajax.url = this.basePath + 'rest/strolch/inspector/' + this.selectedRealm + '/' + this._typeSubPath(this.selectedObjectType);
this.$.ajax.method = 'GET';
this.$.ajax.headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
};
this.$.ajax.generateRequest();
},