MCPcopy Create free account
hub / github.com/vercel/vercel / getReqUrl

Method getReqUrl

packages/cli/src/util/dev/server.ts:2128–2140  ·  view source on GitHub ↗
(rr: RouteResult)

Source from the content-addressed store, hash-verified

2126 }
2127
2128 const getReqUrl = (rr: RouteResult): string | undefined => {
2129 if (rr.dest) {
2130 if (rr.query) {
2131 const destParsed = url.parse(rr.dest);
2132 const destQuery = parseQueryString(destParsed.search);
2133 Object.assign(destQuery, rr.query);
2134 destParsed.search = formatQueryString(destQuery);
2135 return url.format(destParsed);
2136 }
2137 return rr.dest;
2138 }
2139 return req.url;
2140 };
2141
2142 const handleMap = getRoutesTypes(routes);
2143 const missRoutes = handleMap.get('miss') || [];

Callers

nothing calls this directly

Calls 4

parseQueryStringFunction · 0.90
formatQueryStringFunction · 0.90
formatMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected