Google が提供するプロトコル API を使用して Blogger の投稿を更新しようとしています。新しい投稿を正常に作成していますが、更新すると問題が発生します。私は次のコード(Javascript)を持っています:
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' リンク要素の URI と同じです (私が確認しました)。XML から掘り出すよりも簡単なので、再作成するだけです)。問題は見られませんが、何かが足りないのかもしれません。提案?