title: Problems on sending POST requests with Ruby RestClient
body: <p>I want to submit a form with Ruby RestClient to get the BibTex files for some papers. This is the request caught by the browser:</p>
  
  <pre><code>Request URL:
  http://ieeexplore.ieee.org/xpl/downloadCitations
  Request Method:
  POST
  
  Status Code:200 OK (from cache)
  Request Payload
  recordIds=6665065&amp;citations-format=citation-only&amp;download-format=download-bibtex&amp;x=74&amp;y=7
  </code></pre>
  
  <p>So here is my Ruby script:</p>
  
  <pre><code>response = RestClient.post("http://ieeexplore.ieee.org/xpl/downloadCitations", "recordIds"=&gt; 6665065, "citations-format" =&gt; "citation-only", "download-format" =&gt; "download-bibtex", "x" =&gt; "74", "y" =&gt; "7"){|response, request, result, &amp;block|
                      if [301, 302, 307].include?(response.code)
                              puts response
                      else
                              response.return!(request, result, &amp;block)
                      end
              }
  puts response
  </code></pre>
  
  <p>Though I could get the correct results directly in my browser, the script kept returning this:</p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;&lt;title&gt;302 Moved Temporarily&lt;/title&gt;&lt;/head&gt;
  &lt;body bgcolor="#FFFFFF"&gt;
  &lt;p&gt;This document you requested has moved temporarily.&lt;/p&gt;
  &lt;p&gt;It's now at &lt;a href="http://ieeexplore.ieee.org:80/xpl/downloadCitations?reload=true"&gt;http://ieeexplore.ieee.org:80/xpl/downloadCitations?reload=true&lt;/a&gt;.&lt;/p&gt;
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>Does anybody know why this happens?
  Thanks!</p>