Disable parsing on non json content.
This commit is contained in:
parent
4cdeef2e54
commit
9167670b23
1 changed files with 2 additions and 2 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue