You need to sign in to do that
Don't have an account?
SF Practice
Need to send cookie to external URL
Hello, I have a button click opening external URL. On the button click from Lightning controller, I am using e.force:navigateToURL to redirect user to external URL. I need to send cookie information to this external URL. I am using XMLHttpRequest.setRequestHeader but it is not sending cookie info in header while redirecting. Please let me know if this is feasible and what is the way of doing it.
It is working fine if I am adding the information in QueryString but this is not a preferred way.
Thanks,
Gaurav
It is working fine if I am adding the information in QueryString but this is not a preferred way.
Thanks,
Gaurav
You can try passing document.cookie which contains all information of the cookie as a parameter in your page reference. Additional parameters can be passed using the state parameter
Please mark this answer as Best if you find this information helpful. It may help others in the community. Thank You!
Anudeep