title: Ruby HTTParty - get the redirected URL
body: <p>I am trying to send an HTTP request using <strong>HTTParty</strong> with some parameters,</p>
  
  <p>Eg: </p>
  
  <pre><code>GET URL: http://example1.com?a=123&amp;b=456
  
  response_to_get = HTTParty.get('http://example1.com?a=123&amp;b=456')
  </code></pre>
  
  <p>The <strong>redirect_url</strong> for this particular request is <a href="http://example2.com" rel="noreferrer">http://example2.com</a></p>
  
  <p>When I tried the URL <code>http://example1.com?a=123&amp;b=456</code> in browser, it redirects to the expected URL with parameter value appended to it like <code>http://example2.com?c=123trt58</code>, but when I did it using HTTParty, I'm  getting an HTML reponse only.</p>
  
  <p>My requirement is to get the <strong>URL</strong>(<a href="http://example2.com?c=123trt58" rel="noreferrer">http://example2.com?c=123trt58</a>) out from the response. </p>
  
  <p>Thanks in Advance.</p>