Get final redirect URL of a URL in ruby

res = Net::HTTP.get_response(URI('https://www.example.com'))
res['location']

Comments