0
我在尝试使用Google提供的协议API更新Blogger帖子。我创建了新的帖子,工作很好,但更新正在导致我的问题。我有以下代码(Javascript):Blogger API返回400请求编辑URI
postRequest = new Ajax.Request("http://www.blogger.com/feeds/" + activeBlogID + "/posts/default/" + activePostID,
{
method: 'put',
contentType: 'application/atom+xml',
postBody: postXML,
requestHeaders:
{
Authorization: 'GoogleLogin auth=' + authCode
},
onSuccess: this.postRequestSuccess.bind(this),
onFailure: this.postRequestFailure.bind(this)
});
但是每次这都会返回一个400 Bad Request URI。据我所知,URI是正确的(它与'edit'链接元素中的元素相同(我检查过),我只是重新创建它,因为它比从XML中挖掘更容易)。我没有看到任何问题,但也许我错过了一些东西。建议?