<?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>All Thumbs and No Fingers &#187; rest</title>
	<atom:link href="http://redjamjar.net/tags/rest/feed/" rel="self" type="application/rss+xml" />
	<link>http://redjamjar.net</link>
	<description>A bucket for all things</description>
	<lastBuildDate>Mon, 10 May 2010 21:30:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='redjamjar.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Rails &#8211; speaking to rest as a mock webservice</title>
		<link>http://redjamjar.net/2009/02/27/rails-speaking-to-rest-as-a-mock-webservice/</link>
		<comments>http://redjamjar.net/2009/02/27/rails-speaking-to-rest-as-a-mock-webservice/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 11:03:44 +0000</pubDate>
		<dc:creator>Mojo</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rest]]></category>

		<guid isPermaLink="false">http://2thumbs.wordpress.com/?p=52</guid>
		<description><![CDATA[Finally understood the distinctions between webservices and rest. Now I don&#8217;t mean the theory aspects Roy Fieldings paper adequately explains the concepts and frankly helps a great deal to try to introduce technology which is along the lines of &#8216;less is more&#8217;.
What I mean is being able to create a service mock up a test [...]


Related posts:<ol><li><a href='http://redjamjar.net/2009/09/07/secure-copy-how-to/' rel='bookmark' title='Permanent Link: Secure Copy How to'>Secure Copy How to</a> <small>Heres a rough and ready introduction to using the power...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Finally understood the distinctions between webservices and rest. Now I don&#8217;t mean the theory aspects Roy Fieldings paper adequately explains the concepts and frankly helps a great deal to try to introduce technology which is along the lines of &#8216;less is more&#8217;.</p>
<p><span id="more-53"></span>What I mean is being able to create a service mock up a test script and talk to the server using XML.</p>
<p>Here is an example of creating a new Person:<br />
<code><br />
require 'net/http'</p>
<p>s = &lt;&lt;-XML</p>
<p>        Sarah<br />
        Jhummun</p>
<p>    XML</p>
<p>Net::HTTP.start('localhost', 3000) do |http|<br />
  response = http.post('/people.xml', "#{s}", 'Content-Type' =&gt; 'text/xml')</p>
<p>  #Do something with the response.</p>
<p>  puts "Code: #{response.code}"<br />
  puts "Message: #{response.message}"<br />
  puts "Body:\n #{response.body}"<br />
end<br />
</code></p>
<p>and here is an example of retrieving a list of people:<br />
<code><br />
require 'net/http'</p>
<p>Net::HTTP.start('localhost', 3000) do |http|<br />
  response = http.get('/people/', 'Accept' =&gt; 'text/xml')</p>
<p>  #Do something with the response.</p>
<p>  puts "Code: #{response.code}"<br />
  puts "Message: #{response.message}"<br />
  puts "Body:\n #{response.body}"<br />
end<br />
</code></p>


<p>Related posts:<ol><li><a href='http://redjamjar.net/2009/09/07/secure-copy-how-to/' rel='bookmark' title='Permanent Link: Secure Copy How to'>Secure Copy How to</a> <small>Heres a rough and ready introduction to using the power...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://redjamjar.net/2009/02/27/rails-speaking-to-rest-as-a-mock-webservice/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
