class Importmap::Npm

def get_json(uri)

def get_json(uri)
  request = Net::HTTP::Get.new(uri)
  request["Content-Type"] = "application/json"
  response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http|
    http.request(request)
  }
  response.body
rescue => error
  raise HTTPError, "Unexpected transport error (#{error.class}: #{error.message})"
end