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

Added explicit html format option.

This commit is contained in:
John Nunemaker 2008-11-11 19:29:23 -05:00
parent 99a07b58c2
commit e0cb4311d9
2 changed files with 2 additions and 1 deletions

View file

@ -4,6 +4,7 @@ require 'pp'
class Google class Google
include HTTParty include HTTParty
format :html
end end
# google.com redirects to www.google.com so this is live test for redirection # google.com redirects to www.google.com so this is live test for redirection

View file

@ -14,7 +14,7 @@ module HTTParty
class UnsupportedFormat < StandardError; end class UnsupportedFormat < StandardError; end
class RedirectionTooDeep < StandardError; end class RedirectionTooDeep < StandardError; end
AllowedFormats = {:xml => 'text/xml', :json => 'application/json'} AllowedFormats = {:xml => 'text/xml', :json => 'application/json', :html => 'text/html'}
def self.included(base) def self.included(base)
base.extend ClassMethods base.extend ClassMethods