MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / fullUrlForReq

Function fullUrlForReq

lib/utils.mjs:30–39  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

28 * @return {string} Fully qualified URL of the request
29 */
30export function fullUrlForReq (req) {
31 const fullUrl = url.format({
32 protocol: req.protocol,
33 host: req.get('host'),
34 pathname: url.resolve(req.baseUrl, req.path),
35 query: req.query
36 })
37
38 return fullUrl
39}
40
41/**
42 * Removes the `<` and `>` brackets around a string and returns it.

Callers 1

utils-test.mjsFile · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected