var datos='<?xml version="1.0" encoding="UTF-8"?>'+
'<entry xmlns="http://www.w3.org/2005/Atom">'+
'<id>PYDKDbZr4BU</id>'+
'</entry>';
$.ajax({
url:'http://gdata.youtube.com/feeds/api/users/default/favorites',
type: 'POST',
data:datos,
headers: 'Host: gdata.youtube.com',
headers: 'Authorization: GoogleLogin auth='+auth+'',
headers: 'GData-Version: 2',
headers: 'X-GData-Client: 9720453....c.apps.googleusercontent.com',
headers: 'X-GData-Key: key=AI39si5uxhyp...YRUS4K6We7CA',
headers: 'Content-Length: 1941255',
contentType:'application/atom+xml; charset=UTF-8',
success: function(datos){
alert("logro");
console.log(datos)
},
error: function(error){
var mensaje="";
for(var x in error){
mensaje+=x+" : "+error[x]+'<br>';
}
$("#respuesta").html(mensaje);
}
});
我不确定你在做什么这是对的,我澄清我不确定你放置内容长度的价值,因为我从一个例子中得出,我为我的英语道歉,因为我是拉丁语而不是英语口语,澄清,不产生任何回应或错误或终止
答案 0 :(得分:0)
this can help you and is in Spanish
<强>读强>
POST /feeds/api/users/default/favorites HTTP/1.1
Host: gdata.youtube.com
Content-Type: application/atom+xml
Content-Length: CONTENT_LENGTH
Authorization: AuthSub token="AUTHORIZATION_TOKEN"
GData-Version: 2
X-GData-Client: CLIENT_ID
X-GData-Key: key=DEVELOPER_KEY
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<id>VIDEO_ID</id>
</entry>