Module: Falconz::REST::GET

Included in:
Client
Defined in:
lib/falconz/rest/get.rb

Overview

HTTP 1.1 GET request method to make on the API endpoint.

This is a module that is used in pretty much all the API modules in order to talk to the API endpoint.

Instance Method Summary collapse

Instance Method Details

#get_request(path) ⇒ Object

Raises:

  • (RuntimeError)


8
9
10
11
12
# File 'lib/falconz/rest/get.rb', line 8

def get_request(path)
  response = HTTParty.get(url + path, headers: header)
  return response if response.success?
  raise RuntimeError, response
end