forked from extern/egroupware
do NOT check Content-Type header as it's sometimes not set to application/json
parsing JSON will error out, if payload is no JSON anyway happens with mark-as-spam and SpamTitan
This commit is contained in:
parent
59ac3f4bda
commit
3a618937a9
@ -233,7 +233,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd)
|
|||||||
{
|
{
|
||||||
promise = (this.egw.window?this.egw.window:window).fetch(url, init)
|
promise = (this.egw.window?this.egw.window:window).fetch(url, init)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (!response.ok || !response.headers.get('Content-Type').startsWith('application/json')) {
|
if (!response.ok) {
|
||||||
throw response;
|
throw response;
|
||||||
}
|
}
|
||||||
return response.json();
|
return response.json();
|
||||||
|
Loading…
Reference in New Issue
Block a user