2009/11/30 Thomas Bellman <[email protected]>: > Paul Nasrat wrote: > >> 2009/11/30 Paul Nasrat <[email protected]>: > >>> It's worth thinking about what HTTP gives us here to do things like >>> this. One option would be to respond to the post with a temporary >>> redirect to the catalog that the client then GET's. > >> I'm just reading Jim Webber's REST tutorial >> >> http://jim.webber.name/2009/11/20/8eae595a-d1d2-4f4f-87f6-f67280013176.aspx >> >> A more condensed article is here: >> >> http://www.infoq.com/articles/webber-rest-workflow >> >> I'm not through it yet as it's a large deck but looking at it >> >> POST /url/to/post/facts >> >> Could return a HTTP 201 with a Location: > > But then you are back to two requests! What would be the advantage > of that?
> It's perfectly allowable to return content on a POST. There's no > need for Location:. I guess it depends if you want to be able for a client to refer to a resource that represents the catalog at a point in time. This would potentially allow for the ability to expresss the catalog hasn't changed, etc. It might be a personal preference but it feels to me to be a richer representation of an API. Paul -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
