Let's say my sample URL is
http://example.com/one/two
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
.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…