From e0cb4311d9a80bb3a44ac47e7355d2e24dc7307f Mon Sep 17 00:00:00 2001 From: John Nunemaker Date: Tue, 11 Nov 2008 19:29:23 -0500 Subject: [PATCH] Added explicit html format option. --- examples/google.rb | 1 + lib/httparty.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/google.rb b/examples/google.rb index 5b1074a..f629b4d 100644 --- a/examples/google.rb +++ b/examples/google.rb @@ -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 diff --git a/lib/httparty.rb b/lib/httparty.rb index 1959b69..d193e00 100644 --- a/lib/httparty.rb +++ b/lib/httparty.rb @@ -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