Permalink
Browse files

Updated history and examples.

  • Loading branch information...
1 parent 424e752 commit 3953ead723395c25cc6df9059b6f0c4b3aae9c9b @jnunemaker committed Jan 29, 2009
Showing with 7 additions and 2 deletions.
  1. +4 −0 History
  2. +1 −1 examples/basic.rb
  3. +1 −0 examples/delicious.rb
  4. +1 −1 examples/rubyurl.rb
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/')

0 comments on commit 3953ead

Please sign in to comment.