title: Accessing Headers for Net::HTTP::Post in ruby
body: <p>I have the following bit of code:</p>
  
  <pre><code>    uri = URI.parse("https://rs.xxx-travel.com/wbsapi/RequestListenerServlet")
      https = Net::HTTP.new(uri.host,uri.port)
      https.use_ssl = true
      req = Net::HTTP::Post.new(uri.path)
      req.body = searchxml
      req["Accept-Encoding"] ='gzip'
      res = https.request(req)
  </code></pre>
  
  <p>This normally works  fine but the server at the other side is complaining about something in my XML and the techies there need the xml message AND the headers that are being sent.</p>
  
  <p>I've got the xml message, but I can't work out how to get at the Headers  that are  being sent with the above.</p>