class Fortenet::Request
Attributes
response[RW]
Public Instance Methods
delete(path, **options)
click to toggle source
# File lib/fortenet/request.rb, line 22 def delete(path, **options) self.response = self.class.delete(Fortenet.endpoint + path, set_auth(options)) end
get(path, **options)
click to toggle source
# File lib/fortenet/request.rb, line 10 def get(path, **options) self.response = self.class.get(Fortenet.endpoint + path, set_auth(options)) end
parsed_response()
click to toggle source
# File lib/fortenet/request.rb, line 26 def parsed_response return if response.nil? JSON.parse response.body, symbolize_names: true end
post(path, **options)
click to toggle source
# File lib/fortenet/request.rb, line 14 def post(path, **options) self.response = self.class.post(Fortenet.endpoint + path, set_auth(options)) end
put(path, **options)
click to toggle source
# File lib/fortenet/request.rb, line 18 def put(path, **options) self.response = self.class.put(Fortenet.endpoint + path, set_auth(options)) end
Private Instance Methods
set_auth(options)
click to toggle source
# File lib/fortenet/request.rb, line 36 def set_auth(options) Fortenet::Options.new(options).call end