lib/huobi_client/response.rb in huobi_client-0.1.0 vs lib/huobi_client/response.rb in huobi_client-0.1.1
- old
+ new
@@ -11,9 +11,10 @@
@original_response = faraday_response
@body = faraday_response.body
@success = false
begin
+ @body = JSON.parse(@body) unless @body.is_a? Hash
@body = @body.with_indifferent_access if @body.is_a? Hash
rescue => e
p e.message
p e.backtrace.join("\n")
end