On Nov 30, 2009, at 2:25 AM, Paul Nasrat wrote:
> 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.
The whole concept of these resources (e.g., catalogs and facts) having
canonical, network-wide URLs is completely missing from the system
right now, mostly because I don't see a huge benefit to it yet. I
don't see this as a great place to start.
--
A citizen of America will cross the ocean to fight for democracy, but
won't cross the street to vote in a national election.
--Bill Vaughan
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com
--
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.