<?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>Trueform &#187; REST</title>
	<atom:link href="http://www.trueform.co.za/category/tech/rest/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.trueform.co.za</link>
	<description>My one true form</description>
	<lastBuildDate>Wed, 24 Feb 2010 23:54:01 +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>Sending A PUT request to the Server using Ruby on Rails</title>
		<link>http://www.trueform.co.za/2009/11/11/sending-a-put-request-to-the-server-using-ruby-on-rails/</link>
		<comments>http://www.trueform.co.za/2009/11/11/sending-a-put-request-to-the-server-using-ruby-on-rails/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 18:26:55 +0000</pubDate>
		<dc:creator>Gerard L. Petersen</dc:creator>
				<category><![CDATA[REST]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.trueform.co.za/?p=162</guid>
		<description><![CDATA[I have been trying for ages to find out how to send a PUT request to the server using ruby on rails. This page makes no fucking mention of a put() function. I cursed on many occasion.  Here it is. Hope this helps someone.
require &#8216;net/http&#8217;
url  = &#8216;/api/user.xml?id=6&#8242;
post_data = &#8220;&#60;user&#62;&#60;firstname&#62;Freeman&#60;/firstname&#62;&#60;/user&#62;&#8221;
http = Net::HTTP.new(&#8216;www.asdf.com&#8217;)
http.read_timeout = 300 # seconds
http.open_timeout [...]]]></description>
			<content:encoded><![CDATA[<p>I have been trying for ages to find out how to send a PUT request to the server using ruby on rails. <a href="http://stdlib.rubyonrails.org/libdoc/net/http/rdoc/classes/Net/HTTP.html">This page</a> makes no fucking mention of a put() function. I cursed on many occasion.  Here it is. Hope this helps someone.</p>
<blockquote><p>require <span style="color: #808080;">&#8216;net/http&#8217;</span><br />
url  = <span style="color: #808080;">&#8216;/api/user.xml?id=6&#8242;</span><br />
post_data = <span style="color: #808080;">&#8220;&lt;user&gt;&lt;firstname&gt;Freeman&lt;/firstname&gt;&lt;/user&gt;&#8221;</span><br />
http = <span style="color: #ff6600;">Net::HTTP</span><span style="color: #993300;">.new</span>(<span style="color: #808080;">&#8216;www.asdf.com&#8217;</span>)<br />
http.read_timeout = <span style="color: #ff0000;">300</span> <span style="color: #008080;"># seconds</span><br />
http.open_timeout = <span style="color: #ff0000;">180</span> <span style="color: #008080;"># seconds</span><br />
resp, data = http.put(url, post_data)</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.trueform.co.za/2009/11/11/sending-a-put-request-to-the-server-using-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
