我正在尝试根据https://developer.spotify.com/documentation/general/guides/authorization-guide/#client-credentials-flow Client Credentials Flow上的文档发出 http 请求。
我写过
const BASE_URL = 'https://accounts.spotify.com/api/token';
fetch(BASE_URL, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Basic ' + base64(clientID) + ':' + base64(clientSecret)
},
body: JSON.stringify({'grant_type:client_credentials'})
})
这是否按照它所说的去做?我很困惑如何编写发布请求的正文。
阿波罗的战车
莫回无
明月笑刀无情
江户川乱折腾
随时随地看视频慕课网APP
相关分类