Deleting blog post using Blogger API, Javascript and Prototype

Posted by Mikhail on Stack Overflow See other posts from Stack Overflow or by Mikhail
Published on 2010-03-21T22:24:03Z Indexed on 2010/03/21 22:41 UTC
Read the original article Hit count: 671

Filed under:
|
|
|
|

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.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about prototype