I am working with react and axios, i want to get all the live streams from the API
my problem is that i dont know how to convert the curl in the docs to an axios code…
for sure i am doing something worng here… please if someone can help
here is my code
componentDidMount = () => {
axios({
url: 'https://api.twitch.tv/kraken/streams/',
method: 'get',
headers: 'Client-ID: xxxxxxxxxxxxxxxxxxxxxx'
})
.then(res => {
console.log(res)
console.log(res.data);
});
}