Dustin N. Jenkins <Dustin.Jenkins <at> nrc-cnrc.gc.ca> writes:

> 
> The POST is creating a new resource in the persistence layer, then 
> returning, as text, the URL to that new resource.  It just strikes me 
> that returning the textual representation of the URL is a GET operation 
> and should be treated as such, no?  Redirecting and writing to the 
> Response both address my needs, but I don't want to issue a redirect per 
> se.  Thinking it through now, I'd say continuing to write to the 
> response is the most appropriate way.
> 

Isn't this where the "Location" HTTP header should be used, to indicate the URL
of the new resource?

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30

"For 201 (Created) responses, the Location is that of the new resource which was
created by the request."

Ben.

> Thank you,
> - Dustin

[...]



Reply via email to