mirror of
https://github.com/bastienwirtz/homer.git
synced 2026-07-17 16:38:59 +00:00
Pass accept header when fetching the message via url
This commit is contained in:
parent
c7a6f54f35
commit
a2866e1714
1 changed files with 7 additions and 5 deletions
|
|
@ -67,12 +67,14 @@ export default {
|
|||
},
|
||||
|
||||
downloadMessage: function (url) {
|
||||
return fetch(url).then(function (response) {
|
||||
if (response.status != 200) {
|
||||
return;
|
||||
return fetch(url, { headers: { Accept: "application/json" } }).then(
|
||||
function (response) {
|
||||
if (response.status != 200) {
|
||||
return;
|
||||
}
|
||||
return response.json();
|
||||
}
|
||||
return response.json();
|
||||
});
|
||||
);
|
||||
},
|
||||
|
||||
mapRemoteMessage: function (message) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue