Class: AWSData::Transport

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-data/transport.rb

Instance Method Summary collapse

Instance Method Details

#get(path) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/aws-data/transport.rb', line 6

def get(path)
  uri = uri_for(path)
  res = Net::HTTP.get_response(uri)
  if res.is_a?(Net::HTTPSuccess)
    return JSON.parse(res.body)
  else
    raise "oops"
  end
end