Я ищу песни под названием Hello. < /P>
Код: Выделить всё
import axios from 'axios'
const client = axios.create({
baseURL: 'https://api.spotify.com/v1/search',
})
const getTrack = async (song) => {
try {
const token = await getToken()
// I have console logged token and it is valid token
const tracks = await client.post(`?q=${song}&type=track&market=EN`, {
headers: {
Authorization: `Bearer ${token}`,
},
})
return tracks
} catch (error) {
return error
}
}
spotify.js:37 post https://api.spotify.com/v1/search/?>
Подробнее здесь: https://stackoverflow.com/questions/797 ... -the-corre
Мобильная версия