mirror of
https://github.com/kevin-DL/commander_league_web.git
synced 2026-01-11 18:14:27 +00:00
11 lines
265 B
JavaScript
11 lines
265 B
JavaScript
export const authorisedFetchGet = (url, token) => {
|
|
return fetch(url, {
|
|
method: "GET",
|
|
headers: new Headers({
|
|
"Content-Type": "application/json",
|
|
Authorization: token,
|
|
}),
|
|
credentials: "same-origin",
|
|
}).then((res) => res.json());
|
|
};
|