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.
Thank you,
- Dustin
Rob Heittman wrote:
I think, before I made any sound observations, I'd want to know more
about your use case and what functional effects are exposed by this
particular POST.
In general, there's nothing illicit about POST returning either a
meaningful representation, or a redirect. Either of these are the two
most common choices. I don't think the concept of "forwarding" maps
especially well on to the REST style, since it is all about internally
returning the representation of a resource other than the one
addressed by the client. You can achieve it in Restlet by executing a
client operation inside your POSTable resource (and in Restlet 1.1 you
can use the addressable server router on the Component to do this
efficiently), but it looks exactly like the sleight of hand it is.
- Rob
--
Dustin N. Jenkins | Tel/Tél: 250.363.3101 | [EMAIL PROTECTED]
facsimile/télécopieur: (250) 363-0045
National Research Council Canada | 5071 West Saanich Rd, Victoria BC.
V9E 2E7
Conseil national de recherches Canada | 5071, ch. West Saanich, Victoria
(C.-B) V9E 2E7
Government of Canada | Gouvernement du Canada