title: Ruby undefined method `bytesize' for #<Hash:0x2954fe8>
body: <p>i have the following Ruby Code, for a tracking website in sandbox mode:</p>
  
  <pre><code>require "net/http"
  require "net/https"
  require "uri"
  
  xml = &lt;&lt;XML
  &lt;?xml version="1.0" encoding="ISO-8859-1" standalone="no"?&gt;&lt;data appname="dhl_entwicklerportal" language-code="de" password="Dhl_123!" request="get-status-for-public-user"&gt;&lt;data piece-code="00340433836536550280"&gt;&lt;/data&gt;&lt;/data&gt;
  XML
  
  uri = URI('https://cig.dhl.de/services/sandbox/rest/sendungsverfolgung')
  
  nhttp = Net::HTTP.new(uri.host, uri.port)
  nhttp.use_ssl=true
  nhttp.verify_mode=OpenSSL::SSL::VERIFY_NONE
  request = Net::HTTP::Get.new(uri)
  request.basic_auth 'xpackageWP', 'hidden'
  response = nhttp.start {|http|
  http.request(request, xml:xml)
  }
  
  puts response.body
  </code></pre>
  
  <p>I always get the error : </p>
  
  <pre><code>d:/Ruby200/lib/ruby/2.0.0/net/http/generic_request.rb:179:in `send_request_with_body' undefined method `bytesize' for #&lt;Hash:0x2954fe8&gt; (NoMethodError)
  from d:/Ruby200/lib/ruby/2.0.0/net/http/generic_request.rb:130:in `exec'
  from d:/Ruby200/lib/ruby/2.0.0/net/http.rb:1404:in `block in transport_request'
  from d:/Ruby200/lib/ruby/2.0.0/net/http.rb:1403:in `catch'
  from d:/Ruby200/lib/ruby/2.0.0/net/http.rb:1403:in `transport_request'
  from d:/Ruby200/lib/ruby/2.0.0/net/http.rb:1376:in `request'
  from D:/Dropbox_5BHIF/Dropbox/TempDHL/Main.rb:17:in `block in &lt;main&gt;'
  from d:/Ruby200/lib/ruby/2.0.0/net/http.rb:852:in `start'
  from D:/Dropbox_5BHIF/Dropbox/TempDHL/Main.rb:16:in `&lt;main&gt;'
  </code></pre>
  
  <p>I tried really hard to solve this, but i cannot think of any problem.
  When i test it in the Browser with the Link and then a ?xml= it works perfectly, so it seems to be a problem with my Ruby Code.</p>