cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Two bundle for GET and POST for the same resource URL
Date Mon, 22 Jul 2013 09:54:55 GMT
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.
>
>


Mime
View raw message