Let's say my sample url is
and I say I have the following route
app.get('/one/two', function (req, res) {
var url = req.url;
}
The value of url
will be /one/two
.
How do I get the full url in Express?
For example, in the case above, I would like to receive http://example.com/one/two
.
转载于:https://stackoverflow.com/questions/10183291/how-to-get-the-full-url-in-express