<?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>Peter Williams &#187; http</title>
	<atom:link href="http://barelyenough.org/blog/tag/http/feed/" rel="self" type="application/rss+xml" />
	<link>http://barelyenough.org</link>
	<description>… and there is much to be learned</description>
	<lastBuildDate>Mon, 19 Jul 2010 14:57:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Announcing Resourceful</title>
		<link>http://barelyenough.org/blog/2008/06/announcing-resourceful/</link>
		<comments>http://barelyenough.org/blog/2008/06/announcing-resourceful/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 17:48:18 +0000</pubDate>
		<dc:creator>Peter Williams</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[Resourceful]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://pezra.barelyenough.org/blog/?p=356</guid>
		<description><![CDATA[ Resourceful has its initial (0.2) release today.

Resourceful is a sophisticated HTTP client library for Ruby. It will (when it is complete, at least) provide an simple API for fully utilizing the amazing goodness that is HTTP.

It is already tasty, though. The 0.2 release provides


fully compliant HTTP caching

a framework for implementing cache managers (memory based cache [...] ]]></description>
			<content:encoded><![CDATA[<p><a href='http://resourceful.rubyforge.org/'>Resourceful</a> has its <a href='http://github.com/paul/resourceful/commits/rel_0.2'>initial (0.2) release</a> <a href='http://www.theamazingrando.com/blog/index.php/2008/06/30/announcing-resourceful/'>today</a>.</p>

<p>Resourceful is a sophisticated HTTP client library for Ruby. It will (when it is complete, at least) provide an simple API for fully utilizing the amazing goodness that is HTTP.</p>

<p>It is already tasty, though. The 0.2 release provides</p>

<ul>
<li>fully compliant HTTP caching</li>

<li>a framework for implementing cache managers (memory based cache manager provided)</li>

<li>fully compliant transparent redirection handling (with hooks for overriding the default behavior)</li>

<li>plugable HTTP authentication handling (Basic provided)</li>
</ul>

<h3 id='introduction'>Introduction</h3>

<p>The API is strongly influenced by our successful experiences with REST. Each URI is represented by a <code>Resource</code> object. The <code>Resource</code> objects act as a proxy for the conceptual resource. <code>Resources</code> expose the basic set of HTTP verbs: get, put, post, delete. For example to get a representation of some resource you do this</p>

<pre><code>require &#39;resourceful&#39;
http = Resourceful::HttpAccessor.new
resp = http.resource(&#39;http://rubyforge.org&#39;).get
puts resp.body</code></pre>

<p>If you want to post a form you do this</p>

<pre><code>require &#39;resourceful&#39;
http = Resourceful::HttpAccessor.new
resp = http.resource(&#39;http://rubyforge.org&#39;).post(&quot;name=Peter&amp;hobbies=programming,diy&quot;, :content_type =&gt; &quot;application/x-www-form-urlencoded&quot;)
puts resp.code</code></pre>

<p>All non-2xx responses are either handled transparently (e.g. by following redirects) or the method will raise a <code>UnsuccessfulHttpRequestError</code>.</p>

<h3 id='conclusion'>Conclusion</h3>

<p>If you need a decent HTTP library in Ruby come on over and check it out. If you see something you want, or want fixed, feel free to branch the <a href='http://github.com/paul/resourceful/tree/master'>git repo</a> and do it. <a href='http://www.theamazingrando.com/blog/'>Paul</a> and I would love some more contributors and will welcome you with open arms.</p>
]]></content:encoded>
			<wfw:commentRss>http://barelyenough.org/blog/2008/06/announcing-resourceful/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
