module Rancher::ManagementApi
Constants
- VERSION
Public Class Methods
connection(host = nil) { |faraday| ... }
click to toggle source
# File lib/rancher/management_api.rb, line 6 def self.connection(host = nil) Faraday.new(url: host || ENV["RANCHER_URL"]) do |faraday| faraday.headers["Content-Type"] = "application/json" faraday.headers["Accept"] = "application/json" faraday.adapter Faraday.default_adapter yield(faraday) if block_given? end end