lib/wordnik/response.rb in wordnik-0.4.6 vs lib/wordnik/response.rb in wordnik-0.4.7
- old
+ new
@@ -23,12 +23,12 @@
# If body is JSON, parse it
# TODO: If body is XML, parse it
# Otherwise return raw string
def body
- JSON.parse raw.body.encode(::Encoding::UTF_8, undef: :replace)
+ JSON.parse raw.body#.encode(::Encoding::UTF_8, undef: :replace)
rescue
- raw.body.encode(::Encoding::UTF_8, undef: :replace)
+ raw.body#.encode(::Encoding::UTF_8, undef: :replace)
end
def headers
h = {}
raw.headers_hash.each {|k,v| h[k] = v }
\ No newline at end of file