Eu tenho o seguinte codigo:
$.ajax({
//url: 'https://api.spotify.com/v1/me/tracks?ids=1ftBvRj542ol7LT1A0EtL7',
url: 'https://api.spotify.com/v1/me/tracks',
method:"delete",
scope: "user-library-modify",
headers: {
'Authorization': 'Bearer ' + access_token,
'Content-Type':'application/json'
},
data:{'Id':'1ftBvRj542ol7LT1A0EtL7'},
json: true,
success: function(response) {
Console.log(response);
/*for(var k in response.items){
i += 1;
item.push('<li class="ui-state-default" id="m_'+response.items[k].track.id+'">'+response.items[k].track.name + '</li>');
}
item.push('</ul>');
//$('#teste')
//userProfilePlaceholder.innerHTML = userProfileTemplate(response);
userProfilePlaceholder.innerHTML = item.join("");
//console.log(userProfilePlaceholder);
*/
}
});
Mas o parametro data nao está correto:
data:{'Id':'1ftBvRj542ol7LT1A0EtL7'},
Pois da o seguinte erro:
json: true
pordataType: 'json'
. Tente também mudarId
porid
.