Disable parsing on non json content.

This commit is contained in:
Martin Edenhofer 2015-03-23 03:52:29 +01:00
parent 4cdeef2e54
commit 9167670b23

View file

@ -304,7 +304,7 @@ returns
when Net::HTTPOK
data = nil
if options[:json] && response.body
if options[:json] && !options[:jsonParseDisable] && response.body
data = JSON.parse( response.body )
end
return Result.new(
@ -316,7 +316,7 @@ returns
)
when Net::HTTPCreated
data = nil
if options[:json] && response.body
if options[:json] && !options[:jsonParseDisable] && response.body
data = JSON.parse( response.body )
end
return Result.new(