1

I'd like to get a specific param using ExpressJS with "#" instead of "?" in the url...

My URL :

http://localhost:3000/#access_token=LMkdfkdmsklmfdkslklmdskfmsda

I'd like to get "access_token" and "req.params.access_token" doesn't work...

Anthony

1 Answer 1

4

Short answer: you can't.

Longer answer: fragment identifiers (that's the part after the #) are supposed to be evaluated on the client and are not supposed to be sent to server. Your express app has no way of knowing them.

You could try to convert them to query parameters or path variables (i.e. by handling fragment identifier change in javascript) to make them visible server-side.

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.