views:

31

answers:

1

I'm attempting to interface with an API that requires XML data to be contained in the body of an HTTP DELETE request. I'm using urlfetch in AppEngine and the payload is simply ignored for DELETE requests.

After reading this article: http://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request, I realize that the standard probably doesn't allow body content on DELETE requests and that's why urlfetch is stripping the body.

So my question is: is there some sort of work-around to append body content in app engine when urlfetch ignores the payload?

+3  A: 

Per the docs,

The URL fetch service supports five HTTP methods: GET, POST, HEAD, PUT and DELETE. The request can include HTTP headers, and body content for a POST or PUT request.

Given that the GAE Python runtime is heavily sandboxed, it's extremely unlikely that you'll be able to get around this restriction. I consider that to be a bug, and you should probably file a bug report here.

Jonathan Feinberg
Agreed, seems like a bug.
Adam Crossland
elkelk
elkelk, that bug is not related to the question here.
Jonathan Feinberg