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 !
Added explicit html format option.
jnunemaker (author)
Tue Nov 11 16:29:23 -0800 2008
commit  e0cb4311d9a80bb3a44ac47e7355d2e24dc7307f
tree    b26956604fd4bc10cb7482dcb9aacd5b5d18b432
parent  99a07b58c2db1223d029cbafb7b58649f71b8b6c
...
4
5
6
 
7
8
9
...
4
5
6
7
8
9
10
0
@@ -4,6 +4,7 @@ require 'pp'
0
 
0
 class Google
0
   include HTTParty
0
+  format :html
0
 end
0
 
0
 # google.com redirects to www.google.com so this is live test for redirection
...
14
15
16
17
 
18
19
20
...
14
15
16
 
17
18
19
20
0
@@ -14,7 +14,7 @@ module HTTParty
0
   class UnsupportedFormat < StandardError; end
0
   class RedirectionTooDeep < StandardError; end
0
 
0
-  AllowedFormats = {:xml => 'text/xml', :json => 'application/json'}
0
+  AllowedFormats = {:xml => 'text/xml', :json => 'application/json', :html => 'text/html'}
0
   
0
   def self.included(base)
0
     base.extend ClassMethods

Comments