Sha256: 7ab4fff8e9d69a269e87298b9f46af3cea3dcf10f97d8fa72facc837be6a9f37

Contents?: true

Size: 395 Bytes

Versions: 18

Compression:

Stored size: 395 Bytes

Contents

dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
require File.join(dir, 'httparty')
require 'pp'

# You can also use post, put, delete in the same fashion
response = HTTParty.get('http://twitter.com/statuses/public_timeline.json')
puts response.body, response.code, response.message, response.headers.inspect

response.each do |item|
  puts item['user']['screen_name']
end

Version data entries

18 entries across 18 versions & 12 rubygems

Version Path
alexvollmer-httparty-0.4.3 examples/basic.rb
dbalatero-httparty-0.4.4 examples/basic.rb
ddollar-httparty-0.4.6 examples/basic.rb
geetarista-httparty-0.4.5 examples/basic.rb
jcinnamond-httparty-0.4.5 examples/basic.rb
jcinnamond-httparty-0.4.6 examples/basic.rb
jnunemaker-httparty-0.4.3 examples/basic.rb
jnunemaker-httparty-0.4.4 examples/basic.rb
jnunemaker-httparty-0.4.5 examples/basic.rb
kerryb-httparty-0.4.3 examples/basic.rb
mfilej-httparty-0.4.3 examples/basic.rb
nullstyle-httparty-0.4.4 examples/basic.rb
kerryb-httparty-0.4.4 examples/basic.rb
luigi-httparty-0.4.6 examples/basic.rb
yyyc514-httparty-0.4.4.2 examples/basic.rb
httparty-0.4.5 examples/basic.rb
httparty-0.4.4 examples/basic.rb
httparty-0.4.3 examples/basic.rb