You need to sign in to do that
Don't have an account?

302- Object Moved error in HTTP services
Hi All,
I am using HttpRequest and HttpResponse method to make an external call in Apex. But in HttpResponse I am not getting the proper result. I am getting the "Status=Object Moved" and "StatusCode=302". I understand this is because of "response.redirect" on the requested page. For this, I again get theURL for the redirected page and made a new request by setting the new EndPoint. But this time I am getting the "Session time out error".
This is because both request has different session. Any idea how we can made multiple request with same session?
Thanks,
NG
I am using HttpRequest and HttpResponse method to make an external call in Apex. But in HttpResponse I am not getting the proper result. I am getting the "Status=Object Moved" and "StatusCode=302". I understand this is because of "response.redirect" on the requested page. For this, I again get theURL for the redirected page and made a new request by setting the new EndPoint. But this time I am getting the "Session time out error".
This is because both request has different session. Any idea how we can made multiple request with same session?
Thanks,
NG
Hi Naresh,
I know this is an old thread. I stumbled upon it looking for solutions to my own APEX problem.
Have you tried capturing the response headers and using that for the new redirect URL?
You can pass the session for the second request.
Regards.
G