lib/is_it_working/checks/url_check.rb
def instantiate_http #:nodoc:
        http_class = nil

        if @proxy && @proxy[:host]
          http_class = Net::HTTP::Proxy(@proxy[:host], @proxy[:port], @proxy[:username], @proxy[:password])
        else
          http_class = Net::HTTP
        end

        http = http_class.new(@uri.host, @uri.port)
        if @uri.scheme == 'https'
          http.use_ssl = true
          http.verify_mode = OpenSSL::SSL::VERIFY_PEER
        end
        http.open_timeout = @open_timeout
        http.read_timeout = @read_timeout

        return http
      end
def instantiate_http #:nodoc:
        http_class = nil

        if @proxy && @proxy[:host]
          http_class = Net::HTTP::Proxy(@proxy[:host], @proxy[:port], @proxy[:username], @proxy[:password])
        else
          http_class = Net::HTTP
        end

        http = http_class.new(@uri.host, @uri.port)
        if @uri.scheme == 'https'
          http.use_ssl = true
          http.verify_mode = OpenSSL::SSL::VERIFY_PEER
        end
        http.open_timeout = @open_timeout
        http.read_timeout = @read_timeout

        return http
      end
def instantiate_http #:nodoc: http_class = nil if @proxy && @proxy [ :host ] http_class = Net :: HTTP :: Proxy ( @proxy [ :host ] , @proxy [ :port ] , @proxy [ :username ] , @proxy [ :password ] ) else http_class = Net :: HTTP end http = http_class . new ( @uri . host , @uri . port ) if @uri . scheme == 'https' http . use_ssl = true http . verify_mode = OpenSSL :: SSL :: VERIFY_PEER end http . open_timeout = @open_timeout http . read_timeout = @read_timeout return http end
Create an HTTP object with the options set.
Create an HTTP object with the options set .