title: Ruby Net::HTTP Get request Error when using https
body: <p>I have a web server that i need to get some data from. I want to reuse the connection, that's why i chose <code>HTTP.new</code></p>
  
  <pre><code>require "net/http"
  require "openssl"
  uri = URI.parse("https://example.com")
  path = "/index.html"
  http = Net::HTTP.new(uri.host, uri.port,
      :use_ssl =&gt; uri.scheme == 'https')
  request = Net::HTTP::Get.new "/index.html"
  response = http.request(request)
  </code></pre>
  
  <p>When issuing the request (<code>response = http.request(request)</code>) ruby throws a <code>TypeError</code>:</p>
  
  <pre><code>TypeError: no implicit conversion of Hash into String
      from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/net/http.rb:879:in `initialize'
      from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/net/http.rb:879:in `open'
      from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/net/http.rb:879:in `block in connect'
      from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/timeout.rb:74:in `timeout'
      from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/net/http.rb:878:in `connect'
      from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/net/http.rb:863:in `do_start'
      from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/net/http.rb:852:in `start'
      from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/net/http.rb:1375:in `request'
      from (irb):14
      from /usr/local/bin/irb:11:in `&lt;main&gt;'
  </code></pre>
  
  <p>The same request works when i use http</p>