How can I get both header and web page content in a single call?
<p>I’m using Rails 4.2.7.  I know how to use openURI to get the headers from a URL …</p>

<pre><code>open(url){|f| pp f.meta  }
</code></pre>

<p>and I know how to get the contents of the URL</p>

<pre><code>open(url).read
</code></pre>

<p>So how can I get both headers and contents in one call, preferably storing headers into one variable and contents into another?</p>