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:
parent
424e752f6c
commit
3953ead723
4 changed files with 7 additions and 2 deletions
4
History
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
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -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'] }
|
|
@ -11,4 +11,4 @@ class Rubyurl
|
|||
end
|
||||
end
|
||||
|
||||
pp Rubyurl.shorten( 'http://istwitterdown.com/' )
|
||||
pp Rubyurl.shorten( 'http://istwitterdown.com/')
|
Loading…
Reference in a new issue