users@jersey.java.net

Re: [Jersey] 300 MULTIPLE CHOICES

From: Gili <cowwoc_at_bbs.darktech.org>
Date: Sat, 24 Jan 2009 08:31:34 -0800 (PST)

Upon further reflection, perhaps 200 OK is meant to be used for resources
that are expected to return multiple representations, whereas 300 MULTIPLE
CHOICES is meant to be used for resources that aren't expected to do so.

For example:
http://example.com/myDirectory/ should return 200 OK with a list of nested
files

http://example.com/tags/NewYorc should return 300 MULTIPLE CHOICES and
suggest "similar" tags the client may wish to investigate.

This would fall in line with Jersey's treatment of 300 as an exception. What
do you think?

Gili


Gili wrote:
>
> Hi,
>
> I wanted to discuss the fact that Jersey throws UniformInterfaceException
> if the return-code is equal to or greater than 300.
>
> I started a discussion at
> http://stackoverflow.com/questions/401191/how-to-return-random-items-restfully
> and someone suggested that return-code 300 is appropriate for a resource
> whose state consists of links to sub-resources. In such a case, HTTP 300
> would not constitute an error at all. What are your thoughts on the
> matter?
>
> Thanks,
> Gili
>

-- 
View this message in context: http://n2.nabble.com/300-MULTIPLE-CHOICES-tp2209176p2209401.html
Sent from the Jersey mailing list archive at Nabble.com.