I am using an API. In that, I have to send data in query string. Now my
question is how to get back from that site??? because it is not taking
return_url from myside. It gives me response. I want to again redirect
to some action according to the returned value. It is not allowing me to
redirecting multiple times in the same def.
First off, this code should not be in a view. Secondly redirect_to
just doesn't work like that. redirect_to sends a response back to the
browser that tells it to go to the specified url - you'll never see
the response from that server or indeed the request. If you want to
get data out of some 3rd party api then you need to use something like
net/http to make an http request.