Pass accept header when fetching the message via url

pull/706/head^2
Ronald Jerez 2023-02-20 23:11:53 -05:00 committed by Bastien Wirtz
parent c7a6f54f35
commit a2866e1714
1 changed files with 7 additions and 5 deletions

View File

@ -67,12 +67,14 @@ export default {
}, },
downloadMessage: function (url) { downloadMessage: function (url) {
return fetch(url).then(function (response) { return fetch(url, { headers: { Accept: "application/json" } }).then(
if (response.status != 200) { function (response) {
return; if (response.status != 200) {
return;
}
return response.json();
} }
return response.json(); );
});
}, },
mapRemoteMessage: function (message) { mapRemoteMessage: function (message) {