0

I've an url like this: "http://domain.com/get/token#token_id=3042hab1234h00011h", and I need to get the url and retreive token_id from it.

I was using something like this to get all the path and then split it:

app.get('/get/token', function (req, res) { 
    var fullURL = req.protocol + "://" + req.get('host') + req.url;
    console.log(fullURL);
});

But the result is:

http://domain.com/get/token

Any suggestion in how to retreive the token_id or the possibility to match the url and then split it?

Kreshnik
  • 2,661
  • 5
  • 31
  • 39
  • 4
    Take a look [here](http://stackoverflow.com/questions/3664257/why-the-hash-part-of-the-url-is-not-in-the-server-side) and [here](http://stackoverflow.com/questions/317760/how-to-get-url-hash-from-server-side). – hexacyanide Dec 04 '13 at 00:57
  • so I can get the value of token_id only clientside ? – Kreshnik Dec 04 '13 at 01:06
  • Yes, unless you send the value. You should use a query string instead. – hexacyanide Dec 04 '13 at 01:07

0 Answers0