<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Laughing Meme &#187; restful</title>
	<atom:link href="http://laughingmeme.org/tag/restful/feed/" rel="self" type="application/rss+xml" />
	<link>http://laughingmeme.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 02 Apr 2012 20:12:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WOE &#8220;GeoPlanet&#8221;: HTTP/1.1 406 Not Acceptable</title>
		<link>http://laughingmeme.org/2008/11/19/woe-geoplanet-http11-406-not-acceptable/</link>
		<comments>http://laughingmeme.org/2008/11/19/woe-geoplanet-http11-406-not-acceptable/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 23:36:25 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[406]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[geo]]></category>
		<category><![CDATA[geoplanet]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[restful]]></category>
		<category><![CDATA[webservice]]></category>
		<category><![CDATA[woe]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://laughingmeme.org/?p=4087</guid>
		<description><![CDATA[Just putting a note here for the next time I&#8217;m working with the Yahoo! GeoPlanet APIs. The conudrum: a HTTP GET on a given resource (http://where.yahooapis.com/v1/place/23511846?appid=$appid) works in the browser, and works with wget from the command line, but fails from within PHP with a 406 Not Acceptable. The solution, append format=XML to the resource [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/kellan/3039449386/" title="not simple polygons by kellan, on Flickr"><img src="http://farm4.static.flickr.com/3231/3039449386_ccdfe55571.jpg" width="500" height="263" alt="not simple polygons" /></a></p>

<p>Just putting a note here for the next time I&#8217;m working with the <a href="http://developer.yahoo.com/geo/">Yahoo! GeoPlanet</a> APIs.  </p>

<p>The conudrum: a HTTP GET on a given resource (<code>http://where.yahooapis.com/v1/place/23511846?appid=$appid</code>) works in the browser, and works with <code>wget</code> from the command line, but fails from within PHP with a <code>406 Not Acceptable</code>.</p>

<p>The solution, append <code>format=XML</code> to the resource URL, because the service is blowing out its brains on a missing <code>Accept</code>s header.</p>

<p>And that folks is the magic of REST.</p>

<p><strong>update 2008/12/04:</strong> quick scan of my referer logs suggests this is biting folks using <a href="http://search.cpan.org/~gaas/libwww-perl-5.821/lib/LWP/Simple.pm">lwp-simple</a> and wget particularly hard.</p>
]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2008/11/19/woe-geoplanet-http11-406-not-acceptable/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

