Chapter 09/circuit-oneops-1-master/components/cookbooks/diagnostic_cache/files/default/couchbase_monitor.rb
#All REST calls are made through here
All REST calls are made through here
All REST calls are made through here
def rest_call(endpoint)
    logger.info "rest_call:start: for endpoint = #{endpoint}"
    uri = URI.parse(endpoint)
    http = Net::HTTP.new(uri.host, uri.port)
    request = Net::HTTP::Get.new(uri.request_uri)
    request.basic_auth(@username, @password)
    response = http.request(request)
    logger.info 'rest_call:end: Completed'
    return response.body
  end
def rest_call ( endpoint ) logger . info "rest_call:start: for endpoint = #{endpoint}" uri = URI . parse ( endpoint ) http = Net :: HTTP . new ( uri . host , uri . port ) request = Net :: HTTP :: Get . new ( uri . request_uri ) request . basic_auth ( @username , @password ) response = http . request ( request ) logger . info 'rest_call:end: Completed' return response . body end
All REST calls are made through here
All REST calls are made through here
endpoint
<not_specific>