title: Ruby HTTP Post Request - Content Type?
body: <p>I have the following Method:</p>
  
  <pre><code>http_client=Net::HTTP.new(@uri.host,@uri.port)
  request=Net::HTTP::Post.new(@uri.request_uri)
  request.set_form_data(params)
  request.basic_auth(@user,@pass)
  result = http_client.request(request)
  
  #
  # !!! .content_type does not exist !!!
  #
  result=case result.content_type
      when "application/json" JSON.parse(result,{:symbolize_names =&gt; true})
      when "application/xml" XMLHELPER.parse(result)
  end
  result
  </code></pre>
  
  <p>So how to determine the content-type that was sent by the server?</p>