HTTP fetch & post

1
2
3
4
5
6
7
8
9
10
11
12
13
fetch("https://id.twitch.tv/oauth2/token", {
method: "POST",
body: JSON.stringify({
}),
headers: {
"Client-ID": "123",
"Client-Secret": "456",
"Grant-Type": "client_credentials",
"Content-type": "application/json; charset=UTF-8"
}
})
.then((response) => response.json())
.then((json) => console.log(json));