oneops-admin/lib/cms.rb
def http
    http = Net::HTTP.new(@site.host, @site.port)
    # http.use_ssl = @site.is_a?(URI::HTTPS)
    http.verify_mode  = OpenSSL::SSL::VERIFY_NONE if http.use_ssl?
    http.read_timeout = @timeout if @timeout
    # Here's the addition that allows you to see the output
    http.set_debug_output $stderr if ENV['CMS_TRACE'] != nil && ENV['CMS_TRACE'].match(/(true|t|yes|y|1)$/i) != nil
    return http
  end
# Creates new Net::HTTP instance for communication with
# remote service and resources.
Creates new Net::HTTP instance for communication with
remote service and resources.
Creates new Net :: HTTP instance for communication with remote service and resources .
def http
    http = Net::HTTP.new(@site.host, @site.port)
    http.verify_mode  = OpenSSL::SSL::VERIFY_NONE if http.use_ssl?
    http.read_timeout = @timeout if @timeout
    http.set_debug_output $stderr if ENV['CMS_TRACE'] != nil && ENV['CMS_TRACE'].match(/(true|t|yes|y|1)$/i) != nil
    return http
  end
def http http = Net :: HTTP . new ( @site . host , @site . port ) http . verify_mode = OpenSSL :: SSL :: VERIFY_NONE if http . use_ssl? http . read_timeout = @timeout if @timeout http . set_debug_output $stderr if ENV [ 'CMS_TRACE' ] != nil && ENV [ 'CMS_TRACE' ] . match ( / (true|t|yes|y|1)$ /i ) != nil return http end
Creates new Net::HTTP instance for communication with
remote service and resources.
Creates new Net :: HTTP instance for communication with remote service and resources .
# http.use_ssl = @site.is_a?(URI::HTTPS) # Here's the addition that allows you to see the output