You need to sign in to do that
Don't have an account?
eswari
Redirect to third party url - StatusCode=302
Hi,
I have a requirement to redirect to a third party url on click of a submit button. I added the third party url to the Remote Site Settings and invkoing a method on click of 'submit' button.
When I click on the button it is redirecting to the same page with response as 'System.HttpResponse[Status=Moved Temporarily, StatusCode=302]'
Could any one suggest how to resolve this.
When a 302 is returned, the server will also provide the new location. You need to extract that from the headers and request it.
Thanks for your reply.
I am able to get the new location from headers and requesting for the new url. Getting the response for that as 'Status=OK, StatusCode=200'.
But how can i redirect to that page from salesforce. I tried by giving the response as string in PageReference but it failed.
Please help on this.
As you are accessing the initial page via code, why would you need to redirect the users browser to that page?