I want to get URL of route in express js.
http://localhost:9310/api/arsys/v1/entry/SimpleForm5/?fields=Request ID,Assigned To,Status,Submitter,Create Date&q=Status=New&offset=5&sort=Create Date.desc
I want only http://localhost:9310/api/arsys/v1/entry/SimpleForm5/
I tried const url = req.protocol + '://' + req.headers.host + req.url;
which gives http://localhost:9310/SimpleForm5/?fields=Request%20ID,Assigned%20To,Status,Submitter,Create%20Date&q=Status=New&offset=5&sort=Create%20Date.desc
But it does not give /api/arsys/v1/entry/
. Also I does not want query params in output.
Please help