How does Nodejs get the full URL

  node.js, question

Use methods found online
Answers such as req.host, require(‘url’) are null …
For example, a request is

https://localhost:3000/test?a=1&b=2

Nodejs listens to the request and prints it out

var router = require('express').Router();
router.all('/test',function(req, res){
    // 打印出https://localhost:3000/test?a=1&b=2
});

The req.orginalurl object is the original url value, so just console.log