Flowdock
method

create_connection

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: SOAP
create_connection(url) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/soap/netHttpClient.rb, line 123
  def create_connection(url)
    proxy_host = proxy_port = nil
    unless no_proxy?(url)
      proxy_host = @proxy.host
      proxy_port = @proxy.port
    end
    http = Net::HTTP::Proxy(proxy_host, proxy_port).new(url.host, url.port)
    if http.respond_to?(:set_debug_output)
      http.set_debug_output(@debug_dev)
    end
    http.open_timeout = @connect_timeout if @connect_timeout
    http.read_timeout = @receive_timeout if @receive_timeout
    case url
    when URI::HTTPS
      if SSLEnabled
        http.use_ssl = true
      else
        raise RuntimeError.new("Cannot connect to #{url} (OpenSSL is not installed.)")
      end
    when URI::HTTP
      # OK
    else
      raise RuntimeError.new("Cannot connect to #{url} (Not HTTP.)")
    end
    http
  end
Register or log in to add new notes.