Sam Pullara wrote:
>
> Actually in this case I think you are wrong but there might be cases
> that I would agree with. In this case, you should be using PUT to
> create a new image and that can be a separate method.
>
Not an option since the client has no way of knowing what URI to PUT ahead
of time. Currently the client POSTs an image and the server returns it the
new Location.
Sam Pullara wrote:
>
> In general, REST doesn't support what your use case very well as the
> random assortment of images isn't a resource at all. You should
> likely be handling this as
>
> POST /images/random
>
> Which then redirects you to a new URL with the resource that is that
> collection of images (perhaps with the random seed) like this:
>
> POST /images/random -> redirect -> GET /images/random/18923749937
>
I'm curious why you need to return a separate URL for a collection of
images, as opposed to just returning something like this:
<images>
</image uri="/images/{id}">
</pre>
since I'm forced to use POST anyway...
Gili
--
View this message in context: http://n2.nabble.com/JSR311-encourages-bad-design-tp2094913p2096332.html
Sent from the Jersey mailing list archive at Nabble.com.