<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: RESTful POSTing</title>
	<atom:link href="http://benramsey.com/archives/restful-posting/feed/" rel="self" type="application/rss+xml" />
	<link>http://benramsey.com/archives/restful-posting/</link>
	<description>PHP and Other Techno-babble</description>
	<lastBuildDate>Mon, 01 Feb 2010 11:59:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: paul morgan</title>
		<link>http://benramsey.com/archives/restful-posting/comment-page-1/#comment-7845</link>
		<dc:creator>paul morgan</dc:creator>
		<pubDate>Fri, 22 Dec 2006 14:21:48 +0000</pubDate>
		<guid isPermaLink="false">http://benramsey.com/archives/restful-posting/#comment-7845</guid>
		<description>You may find the following two sites useful in getting to grips with REST and the concept of valid POSTing to simlar URLs. The &quot;REST dialogues&quot; are quite interesting. Duncan also heavily pushes the ATOM Publishing Protocol as the way to go.

&lt;a href=&quot;http://duncan-cragg.org/blog&quot; rel=&quot;nofollow&quot;&gt;duncan cragg&lt;/a&gt;

.. and a couter point from an Ebay developer to some of duncan&#039;s points in the REST dialogues
&lt;a href=&quot;http://www.addsimplicity.com/&quot; rel=&quot;nofollow&quot;&gt;Dan Pritchett&lt;/a&gt;

hth</description>
		<content:encoded><![CDATA[<p>You may find the following two sites useful in getting to grips with REST and the concept of valid POSTing to simlar URLs. The &#8220;REST dialogues&#8221; are quite interesting. Duncan also heavily pushes the ATOM Publishing Protocol as the way to go.</p>
<p><a href="http://duncan-cragg.org/blog" rel="nofollow">duncan cragg</a></p>
<p>.. and a couter point from an Ebay developer to some of duncan&#8217;s points in the REST dialogues<br />
<a href="http://www.addsimplicity.com/" rel="nofollow">Dan Pritchett</a></p>
<p>hth</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Norman Gerre</title>
		<link>http://benramsey.com/archives/restful-posting/comment-page-1/#comment-7815</link>
		<dc:creator>Norman Gerre</dc:creator>
		<pubDate>Thu, 21 Dec 2006 22:40:12 +0000</pubDate>
		<guid isPermaLink="false">http://benramsey.com/archives/restful-posting/#comment-7815</guid>
		<description>It&#039;s worth reading the Atom Publishing Protocol spec if you&#039;re interested in RESTful design.

Don&#039;t forget the other HTTP status codes: POSTing a new set of customer data to &lt;code&gt;/customer&lt;/code&gt; should return a &lt;code&gt;201 Created&lt;/code&gt; status code along with the location of the new resource. 

It also sounds like you might still not be clear on what it means to be a &quot;unique resources&quot; -- a resource is anything which can be identified by a URI. It&#039;s perfectly acceptable to define &lt;code&gt;/customer&lt;/code&gt; as &quot;the details of the currently-visiting customer&quot;, for example. It is &lt;strong&gt;conceptually unique&lt;/strong&gt;, even though it returns a different HTML representation for each viewer. You would probably use the &lt;code&gt;Content-Location&lt;/code&gt; header to point to a more specific URI, like &lt;code&gt;/customer/{customer_id}&lt;/code&gt;. Dereferencing either URI could return the same HTML; what matters is the conceptual difference.

 /blog/posts/1 is &quot;the first post in the blog&quot;
 /blog/2002/01/01/frist-psot is &quot;the blog entry posted on 2002-01-01 titled &#039;frist-psot&#039;&quot;.

It&#039;s the same content, but two different resources with slightly different semantics.

What really matters is that you think in terms of nouns instead of verbs. &quot;create-customer.php&quot; is wrong because it contains a verb (create), and REST requires that you use only GET, POST, PUT and DELETE. Instead of inventing your own verb, you use POST to append an item to the &quot;collection-of-users&quot; (&lt;code&gt;/customer&lt;/code&gt;) noun. Beyond that it&#039;s just a matter of good design versus bad -- using the *right* nouns.</description>
		<content:encoded><![CDATA[<p>It&#8217;s worth reading the Atom Publishing Protocol spec if you&#8217;re interested in RESTful design.</p>
<p>Don&#8217;t forget the other HTTP status codes: POSTing a new set of customer data to <code>/customer</code> should return a <code>201 Created</code> status code along with the location of the new resource. </p>
<p>It also sounds like you might still not be clear on what it means to be a &#8220;unique resources&#8221;&#8212;a resource is anything which can be identified by a URI. It&#8217;s perfectly acceptable to define <code>/customer</code> as &#8220;the details of the currently-visiting customer&#8221;, for example. It is <strong>conceptually unique</strong>, even though it returns a different HTML representation for each viewer. You would probably use the <code>Content-Location</code> header to point to a more specific URI, like <code>/customer/{customer_id}</code>. Dereferencing either URI could return the same HTML; what matters is the conceptual difference.</p>
<p> /blog/posts/1 is &#8220;the first post in the blog&#8221;<br />
 /blog/2002/01/01/frist-psot is &#8220;the blog entry posted on 2002-01-01 titled &#8216;frist-psot&#8217;&#8221;.</p>
<p>It&#8217;s the same content, but two different resources with slightly different semantics.</p>
<p>What really matters is that you think in terms of nouns instead of verbs. &#8220;create-customer.php&#8221; is wrong because it contains a verb (create), and REST requires that you use only GET, POST, PUT and DELETE. Instead of inventing your own verb, you use POST to append an item to the &#8220;collection-of-users&#8221; (<code>/customer</code>) noun. Beyond that it&#8217;s just a matter of good design versus bad&#8212;using the <strong>right</strong> nouns.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
