Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated history and examples.

  • Loading branch information...
commit 3953ead723395c25cc6df9059b6f0c4b3aae9c9b 1 parent 424e752
@jnunemaker authored
View
4 History
@@ -1,3 +1,7 @@
+== 0.2.9 2009-01-29
+* 1 minor enhancement
+ * Added a 'headers' accessor to the response with a hash of any HTTP headers. (Don Peterson)
+ * Add support for a ":cookies" option to be used at the class level, or as an option on any individual call. It should be passed a hash, which will be converted to the proper format and added to the request headers when the call is made. (Don Peterson)
== 0.2.8 2009-01-28
* 1 major fix
* fixed major bug with response where it wouldn't iterate or really work at all with parsed responses
View
2  examples/basic.rb
@@ -4,7 +4,7 @@
# You can also use post, put, delete in the same fashion
response = HTTParty.get('http://twitter.com/statuses/public_timeline.json')
-pp response
+puts response.body, response.code, response.headers.inspect
response.each do |item|
puts item['user']['screen_name']
View
1  examples/delicious.rb
@@ -34,3 +34,4 @@ def recent(options={})
pp delicious.posts(:query => {:tag => 'ruby'})
pp delicious.recent
+delicious.recent['posts']['post'].each { |post| puts post['href'] }
View
2  examples/rubyurl.rb
@@ -11,4 +11,4 @@ def self.shorten( website_url )
end
end
-pp Rubyurl.shorten( 'http://istwitterdown.com/' )
+pp Rubyurl.shorten( 'http://istwitterdown.com/')
Please sign in to comment.
Something went wrong with that request. Please try again.