2012/6/27 Alessandro Adamou <[email protected]>: > So far I've made these methods return 303 See Other with the created > resource, basically because I wanted browsers to automatically redirect to > that URL when the ontology is added using the HTML form. But I've been > thinking that perhaps returning a 201 CREATED would be more appropriate on > the REST side.
I think 201 is the right way to go. The response of a POST just tells you that the resource was created and optionally where it was created using the Location header. You can also use 303 and hope that the client interprets it correctly. But this response may not be the right one for all clients. Another client than a browser may not need the redirect and will perhaps be confused. Therefore, the 201 is IMO the best solution and instead implement the redirect separately. Best, - Fabian
