method
create_connection

Ruby latest stable (v2_5_5)
-
0 notes -
Class: SOAP
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
create_connection(url)
private
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