<?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: REST Web Services, the Book</title>
	<atom:link href="http://www.trachtenberg.com/blog/2006/11/06/rest-web-services-the-book/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.trachtenberg.com/blog/2006/11/06/rest-web-services-the-book/</link>
	<description>Thoughts on PHP, eBay, and too many technical topics for my family's liking.</description>
	<lastBuildDate>Thu, 18 Feb 2010 23:21:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ben Ramsey</title>
		<link>http://www.trachtenberg.com/blog/2006/11/06/rest-web-services-the-book/comment-page-1/#comment-103064</link>
		<dc:creator>Ben Ramsey</dc:creator>
		<pubDate>Fri, 15 Jun 2007 18:21:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.trachtenberg.com/blog/2006/11/06/rest-web-services-the-book/#comment-103064</guid>
		<description>I know I&#039;m very late to this discussion, but I would argue that a 404 error for a zip code that doesn&#039;t exist is inappropriate for GET /search?zip=12345 because the resource /search technically exists. However, if you changed it to GET /search/zip/12345, then a 404 error is completely appropriate because the /search/zip/12345 resource does not exist. I do not think the query string is part of the requested resource even though it affects the requested resource.</description>
		<content:encoded><![CDATA[<p>I know I&#8217;m very late to this discussion, but I would argue that a 404 error for a zip code that doesn&#8217;t exist is inappropriate for GET /search?zip=12345 because the resource /search technically exists. However, if you changed it to GET /search/zip/12345, then a 404 error is completely appropriate because the /search/zip/12345 resource does not exist. I do not think the query string is part of the requested resource even though it affects the requested resource.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JÃ¶rn Horstmann</title>
		<link>http://www.trachtenberg.com/blog/2006/11/06/rest-web-services-the-book/comment-page-1/#comment-19977</link>
		<dc:creator>JÃ¶rn Horstmann</dc:creator>
		<pubDate>Mon, 06 Nov 2006 21:19:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.trachtenberg.com/blog/2006/11/06/rest-web-services-the-book/#comment-19977</guid>
		<description>I think that a wellformed HTTP can also result in a 4xx kind of error, like a request for a non-existent resource which results in a 404. This would seem like a good solution to your example of an invalid zip code. The combination of search parameters results in a url like &#039;search?zip=12345&#039; and an 404 status would be the expected outcome of manually modifying an url.

Of course this would only work if the upstream server reports meaningful error messages or additional fault codes that one can map to client errors. If I could not trace the error back to some faulty parameters the client supplied, I would return a 5xx status code.</description>
		<content:encoded><![CDATA[<p>I think that a wellformed HTTP can also result in a 4xx kind of error, like a request for a non-existent resource which results in a 404. This would seem like a good solution to your example of an invalid zip code. The combination of search parameters results in a url like &#8217;search?zip=12345&#8242; and an 404 status would be the expected outcome of manually modifying an url.</p>
<p>Of course this would only work if the upstream server reports meaningful error messages or additional fault codes that one can map to client errors. If I could not trace the error back to some faulty parameters the client supplied, I would return a 5xx status code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Trachtenberg</title>
		<link>http://www.trachtenberg.com/blog/2006/11/06/rest-web-services-the-book/comment-page-1/#comment-19938</link>
		<dc:creator>Adam Trachtenberg</dc:creator>
		<pubDate>Mon, 06 Nov 2006 18:19:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.trachtenberg.com/blog/2006/11/06/rest-web-services-the-book/#comment-19938</guid>
		<description>JÃ¶rn --

Makes sense. Where I run into issues is around the phrase &quot;client seems to have erred.&quot; Is this referring to the format of the request or its content? Or both?

If I have something that&#039;s valid HTTP, but the data that&#039;s provided is invalid for the web service, is that 2xx or 4xx? The client generated a valid request structurally, but the user operating the client made the client pass along invalid data.

Likewise, what happens when I have stacked clients and servers? My PHP script is both a server (processing AJAX requests from the browser) and a client (sending SOAP requests to eBay). If there&#039;s a client error (4xx) between me and eBay should that turn into a server error (5xx) between me and the web browser? Or stay a client error?

Should I not expose this nature to the browser? I am thinking not, as why should it matter if the data is being gathered from a web service or a database, but I want to make sure.</description>
		<content:encoded><![CDATA[<p>JÃ¶rn &#8211;</p>
<p>Makes sense. Where I run into issues is around the phrase &#8220;client seems to have erred.&#8221; Is this referring to the format of the request or its content? Or both?</p>
<p>If I have something that&#8217;s valid HTTP, but the data that&#8217;s provided is invalid for the web service, is that 2xx or 4xx? The client generated a valid request structurally, but the user operating the client made the client pass along invalid data.</p>
<p>Likewise, what happens when I have stacked clients and servers? My PHP script is both a server (processing AJAX requests from the browser) and a client (sending SOAP requests to eBay). If there&#8217;s a client error (4xx) between me and eBay should that turn into a server error (5xx) between me and the web browser? Or stay a client error?</p>
<p>Should I not expose this nature to the browser? I am thinking not, as why should it matter if the data is being gathered from a web service or a database, but I want to make sure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leonard Richardson</title>
		<link>http://www.trachtenberg.com/blog/2006/11/06/rest-web-services-the-book/comment-page-1/#comment-19900</link>
		<dc:creator>Leonard Richardson</dc:creator>
		<pubDate>Mon, 06 Nov 2006 14:48:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.trachtenberg.com/blog/2006/11/06/rest-web-services-the-book/#comment-19900</guid>
		<description>If you send me your email I&#039;ll send you the current version of the appendix. There&#039;s also a list of status codes in &quot;HTTP: The Definitive Guide&quot;. I haven&#039;t actually gone through that list and normalized it against the appendix.</description>
		<content:encoded><![CDATA[<p>If you send me your email I&#8217;ll send you the current version of the appendix. There&#8217;s also a list of status codes in &#8220;HTTP: The Definitive Guide&#8221;. I haven&#8217;t actually gone through that list and normalized it against the appendix.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JÃ¶rn Horstmann</title>
		<link>http://www.trachtenberg.com/blog/2006/11/06/rest-web-services-the-book/comment-page-1/#comment-19862</link>
		<dc:creator>JÃ¶rn Horstmann</dc:creator>
		<pubDate>Mon, 06 Nov 2006 12:18:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.trachtenberg.com/blog/2006/11/06/rest-web-services-the-book/#comment-19862</guid>
		<description>An overview of the status codes can be found in rfc 2616 (http://rfc.net/rfc2616.html#p58). Status codes starting with 4 are used when the error seems to be on the client side, codes starting with 5 should be used for server errors.</description>
		<content:encoded><![CDATA[<p>An overview of the status codes can be found in rfc 2616 (<a href="http://rfc.net/rfc2616.html#p58" rel="nofollow">http://rfc.net/rfc2616.html#p58</a>). Status codes starting with 4 are used when the error seems to be on the client side, codes starting with 5 should be used for server errors.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
