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
|
when Net::HTTPOK
|
||||||
data = nil
|
data = nil
|
||||||
if options[:json] && response.body
|
if options[:json] && !options[:jsonParseDisable] && response.body
|
||||||
data = JSON.parse( response.body )
|
data = JSON.parse( response.body )
|
||||||
end
|
end
|
||||||
return Result.new(
|
return Result.new(
|
||||||
|
@ -316,7 +316,7 @@ returns
|
||||||
)
|
)
|
||||||
when Net::HTTPCreated
|
when Net::HTTPCreated
|
||||||
data = nil
|
data = nil
|
||||||
if options[:json] && response.body
|
if options[:json] && !options[:jsonParseDisable] && response.body
|
||||||
data = JSON.parse( response.body )
|
data = JSON.parse( response.body )
|
||||||
end
|
end
|
||||||
return Result.new(
|
return Result.new(
|
||||||
|
|
Loading…
Reference in a new issue