0

I have a situation where I am doing login using JavaScript Ajax(POST) call(which gives me access tokens). After login, in success method I want to redirect user to dashboard, using a page reload(which document.location.href does). While redirecting to dashboard, I want to set access tokens in headers. How can we achieve that ?

1 Answer 1

1

You can do it the following way:

xhr.setRequestHeader('custom-header', 'value');
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.