I am using httparty to send a get request and then trying to follow the redirect:
get 'https://accounts.google.com/o/oauth2/auth'
how can i follow the redirect using HTTParty?
sorry if this have been asked before, but i could not find the answer anywhere.
Thanks
Probably it's not needed now, but for someone who need.
From documentation, there is special option for automatically redirects
follow_redirects(value = true) ⇒ Object
Proceed to the location header when an HTTP response dictates a redirect. Redirects are always followed by default.
So you can use this options like that:
HTTParty.get('http://google.com', follow_redirects: true)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With