Class: HTTP::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/versacommerce/theme_api_client/fetcher.rb

Instance Method Summary collapse

Instance Method Details

#jsonObject



94
95
96
97
98
99
100
# File 'lib/versacommerce/theme_api_client/fetcher.rb', line 94

def json
  @json ||= if mime_type == 'application/json'
    JSON.parse(to_s)
  else
    {}
  end
end