lib/falconz/rest/get.rb in falconz-1.0.0 vs lib/falconz/rest/get.rb in falconz-1.0.1
- old
+ new
@@ -1,16 +1,15 @@
module Falconz
module REST
+ # 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.
module GET
- def get_request(path, json: false, **options)
+ def get_request(path)
response = HTTParty.get(url + path, headers: header)
- if response.success?
- return response.body if json
- return response
- else
- binding.pry
- raise response.to_h
- end
+ return response if response.success?
+ raise response
end
end
end
end