MCPcopy Create free account
hub / github.com/nodejs/node / getPathName

Function getPathName

test/parallel/test-inspector-network-http.js:51–53  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

49}
50
51function getPathName(req) {
52 return new URL(req.url, `http://${req.headers.host}`).pathname;
53}
54
55const handleRequest = (req, res) => {
56 const path = getPathName(req);

Callers 1

handleRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected