1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Updated history and examples.

This commit is contained in:
John Nunemaker 2009-01-29 04:20:55 -05:00
parent 424e752f6c
commit 3953ead723
4 changed files with 7 additions and 2 deletions

View file

@ -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 file

@ -4,7 +4,7 @@ require 'pp'
# 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 file

@ -34,3 +34,4 @@ delicious = Delicious.new(config['username'], config['password'])
pp delicious.posts(:query => {:tag => 'ruby'})
pp delicious.recent
delicious.recent['posts']['post'].each { |post| puts post['href'] }

View file

@ -11,4 +11,4 @@ class Rubyurl
end
end
pp Rubyurl.shorten( 'http://istwitterdown.com/' )
pp Rubyurl.shorten( 'http://istwitterdown.com/')