title: How to get redirect URL withour following in RestClient
body: <pre><code>if resp.code == 302
     resp.follow_redirection(req, result, &amp;block)
  else
     final_url = req.url
     resp.return!(req, result, &amp;block)
     final_url
  end
  </code></pre>
  
  <p>This works to get the redirect URL. But how to get it without following redirects</p>