Skip to content

Commit

Permalink
Pass accept header when fetching the message via url
Browse files Browse the repository at this point in the history
  • Loading branch information
RonaldJerez authored and bastienwirtz committed Oct 30, 2024
1 parent c7a6f54 commit a2866e1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/Message.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a2866e1

Please sign in to comment.