public
Rubygem
Description: Makes http fun! Also, makes consuming restful web services dead easy.
Homepage:
Clone URL: git://github.com/jnunemaker/httparty.git
Click here to lend your support to: httparty and make a donation at www.pledgie.com !
jnunemaker (author)
Thu Apr 30 04:58:49 -0700 2009
commit  8da360fb4dbc54041a0e65e5b78a83ad408b7db4
tree    56ef81051f6d603cc4f74db52b10eb6ed6473c69
parent  3ad80611e98f7a795174c41e6700ec61bafb84da
httparty / examples / whoismyrep.rb
100644 10 lines (8 sloc) 0.314 kb
1
2
3
4
5
6
7
8
9
10
dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
require File.join(dir, 'httparty')
require 'pp'
 
class Rep
  include HTTParty
end
 
pp Rep.get('http://whoismyrepresentative.com/whoismyrep.php?zip=46544')
pp Rep.get('http://whoismyrepresentative.com/whoismyrep.php', :query => {:zip => 46544})