I do a POST without an entity, and I think there are valid use cases for it (albeit these are edge cases).

In order to do so, I had to override the handlePost() method to accept empty request bodies (bypassing that isEntityAvailable() check).

I don't think there's anything unrestful in doing this, nor contrary to the HTTP spec.

I'm assuming you're using a web browser client, because an "adjustment" to an existing resource would imply PUT, right? But, as we know, PUT/DELETE sucks on web browsers.

Adam


Sean Landis wrote:
We are creating a web service as follows:

http://host/inventoryManager/{product_id}?adjust={n}

This will adjust inventory for a particular product. RESTfully, this should be a
POST. We have all the scoping info in the URI in a form recommended by "RESTful Web Services" in the case of an algorithmic resource.
Unfortunately, Restlet does not allow POST with an empty body, or a body with
zero length. The test occurs in Message.isEntityAvailable() and is called in the POST case from Request.isEntityAvailable.

I haven't seen anywhere that it is unRESTful to have an empty entity. Is this
a W3C constraint? Or just a RESTlet constraint? Does it make sense?

Reply via email to