lib/newrelic-management/client.rb
def nr_api
      # => Build the Faraday Connection
      @conn ||= Faraday::Connection.new('https://api.newrelic.com', conn_opts) do |client|
        client.use Faraday::Response::RaiseError
        client.use FaradayMiddleware::EncodeJson
        client.use FaradayMiddleware::ParseJson, content_type: /\bjson$/
        client.response :logger if Config.environment.to_s.casecmp('development').zero? # => Log Requests to STDOUT
        client.adapter Faraday.default_adapter #:net_http_persistent
      end
    end
def nr_api
      # => Build the Faraday Connection
      @conn ||= Faraday::Connection.new('https://api.newrelic.com', conn_opts) do |client|
        client.use Faraday::Response::RaiseError
        client.use FaradayMiddleware::EncodeJson
        client.use FaradayMiddleware::ParseJson, content_type: /\bjson$/
        client.response :logger if Config.environment.to_s.casecmp('development').zero? # => Log Requests to STDOUT
        client.adapter Faraday.default_adapter #:net_http_persistent
      end
    end
def nr_api # => Build the Faraday Connection @conn ||= Faraday :: Connection . new ( 'https://api.newrelic.com' , conn_opts ) do | client | client . use Faraday :: Response :: RaiseError client . use FaradayMiddleware :: EncodeJson client . use FaradayMiddleware :: ParseJson , content_type : / \b / client . response :logger if Config . environment . to_s . casecmp ( 'development' ) . zero? # => Log Requests to STDOUT client . adapter Faraday . default_adapter #:net_http_persistent end end
=> Build the HTTP Connection
= > Build the HTTP Connection