Deleting blog post using Blogger API, Javascript and Prototype
- by Mikhail
Hello, everyone!
I'm trying to delete a blog post on blogger.com using Blogger API via Prototype Javascript library. Here's my code:
var request = new Ajax.Request(
'http://www.blogger.com/feeds/'+remoteBlogId+'/posts/default/'+postId
{
method:'DELETE',
requestHeaders:['Authorization', 'GoogleLogin auth='+authKey],
on200:function(){/*onSuccess*/},
onFailure:function(){/*onFailure*/}
}
);
As far as I can see from API description, everything's alright, but when I run this, it fires onSuccess function, but doesn't delete the entry on the server.
I guess that Prototype doesn't work well with HTTP methods other than GET and POST (here's the ticket describing similar problem though proposed patch didn't work for me)
Any help is appreciated!
Thanks in advance, Mikhail.