<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -12,6 +12,10 @@ module RestClient
 	#   resource = RestClient::Resource.new('http://protected/resource', :user =&gt; 'user', :password =&gt; 'password')
 	#   resource.delete
 	#
+	# With a timeout (seconds):
+	#
+	#   RestClient::Resource.new('http://slow', :timeout =&gt; 10)
+	#
 	# You can also use resources to share common headers. For headers keys,
 	# symbols are converted to strings. Example:
 	#
@@ -38,37 +42,37 @@ module RestClient
 		end
 
 		def get(additional_headers={})
-			Request.execute(:method =&gt; :get,
+			Request.execute(options.merge(
+				:method =&gt; :get,
 				:url =&gt; url,
-				:user =&gt; user,
-				:password =&gt; password,
-				:headers =&gt; headers.merge(additional_headers))
+				:headers =&gt; headers.merge(additional_headers)
+			))
 		end
 
 		def post(payload, additional_headers={})
-			Request.execute(:method =&gt; :post,
+			Request.execute(options.merge(
+				:method =&gt; :post,
 				:url =&gt; url,
 				:payload =&gt; payload,
-				:user =&gt; user,
-				:password =&gt; password,
-				:headers =&gt; headers.merge(additional_headers))
+				:headers =&gt; headers.merge(additional_headers)
+			))
 		end
 
 		def put(payload, additional_headers={})
-			Request.execute(:method =&gt; :put,
+			Request.execute(options.merge(
+				:method =&gt; :put,
 				:url =&gt; url,
 				:payload =&gt; payload,
-				:user =&gt; user,
-				:password =&gt; password,
-				:headers =&gt; headers.merge(additional_headers))
+				:headers =&gt; headers.merge(additional_headers)
+			))
 		end
 
 		def delete(additional_headers={})
-			Request.execute(:method =&gt; :delete,
+			Request.execute(options.merge(
+				:method =&gt; :delete,
 				:url =&gt; url,
-				:user =&gt; user,
-				:password =&gt; password,
-				:headers =&gt; headers.merge(additional_headers))
+				:headers =&gt; headers.merge(additional_headers)
+			))
 		end
 
 		def to_s
@@ -87,6 +91,10 @@ module RestClient
 			options[:headers] || {}
 		end
 
+		def timeout
+			options[:timeout]
+		end
+
 		# Construct a subresource, preserving authentication.
 		#
 		# Example:</diff>
      <filename>lib/resource.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1a4d8480257047ac70ac3c29f7b867b7c7ccaef4</id>
    </parent>
  </parents>
  <author>
    <name>Adam Wiggins</name>
    <email>adam@heroku.com</email>
  </author>
  <url>http://github.com/pedro/rest-client/commit/e91fd21c1fb8df6eea788d31b6f397fdb7712331</url>
  <id>e91fd21c1fb8df6eea788d31b6f397fdb7712331</id>
  <committed-date>2008-12-08T01:47:23-08:00</committed-date>
  <authored-date>2008-12-08T01:47:23-08:00</authored-date>
  <message>:timeout option for RestClient::Resource constructor</message>
  <tree>b4add3851bb53c792617ad2d2f5e11aeef5433ac</tree>
  <committer>
    <name>Adam Wiggins</name>
    <email>adam@heroku.com</email>
  </committer>
</commit>
