Class: Vigia::HttpClient::RestClient

Inherits:
Object
  • Object
show all
Defined in:
lib/vigia/http_client/rest_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_client_options) ⇒ RestClient

Returns a new instance of RestClient.



6
7
8
# File 'lib/vigia/http_client/rest_client.rb', line 6

def initialize(http_client_options)
  @http_client_options = http_client_options
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



4
5
6
# File 'lib/vigia/http_client/rest_client.rb', line 4

def body
  @body
end

#codeObject

Returns the value of attribute code.



4
5
6
# File 'lib/vigia/http_client/rest_client.rb', line 4

def code
  @code
end

#headersObject

Returns the value of attribute headers.



4
5
6
# File 'lib/vigia/http_client/rest_client.rb', line 4

def headers
  @headers
end

Instance Method Details

#runObject



10
11
12
# File 'lib/vigia/http_client/rest_client.rb', line 10

def run
  cache_or_perform_request
end

#run!Object



14
15
16
# File 'lib/vigia/http_client/rest_client.rb', line 14

def run!
  perform_request
end