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:
parent
99a07b58c2
commit
e0cb4311d9
2 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ require 'pp'
|
|||
|
||||
class Google
|
||||
include HTTParty
|
||||
format :html
|
||||
end
|
||||
|
||||
# google.com redirects to www.google.com so this is live test for redirection
|
||||
|
|
|
@ -14,7 +14,7 @@ module HTTParty
|
|||
class UnsupportedFormat < 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)
|
||||
base.extend ClassMethods
|
||||
|
|
Loading…
Add table
Reference in a new issue