mirror of
https://github.com/bastienwirtz/homer.git
synced 2024-10-05 01:42:01 +02:00
Pass accept header when fetching the message via url
This commit is contained in:
parent
d362add383
commit
d8050d5e57
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user