I am trying to work with an api but I can’t get the result of the request:
async function user(id) {
let req = new Request(`https://api.clashroyale.com/v1/players/%23${id}`)
req.method = "GET";
req.headers = {"authorization": `Bearer ${token}`}
let json = await req
console.log(json)
}
It returns
Request {}
How can I get the content of the response?