Hi
On 22/07/13 10:48, Andrei Shakirin wrote:
Hi,

A question regarding REST design.

Is it technically possible to provide two OSGi bundles for the same resource 
URL, that one bundle exposes GET method and other POST method for the same 
resource?

Use case read and write access to the resource must be spitted to  different 
OSGi services (bundles). But from design view is undesired to have different 
resource URLs.

Sure, typically a 'container' resource can support both GET & POST, example, "/customers", GET will return a list of customers, POST will add a new customer. If we talk about a single resource, say '/customer' than a purer way is to have PUT instead of POST, but if working with PUT is difficult then POST would do IMHO

Cheers, Sergey

Regards,
Andrei.



Reply via email to