var
URL = require(
'url'
);
var
p = URL.parse(testUrl);
console.log(
"------------------href : "
+ p.href);
console.log(
"------------------requestHead: "
+ p.protocol);
console.log(
"------------------hostname: "
+ p.hostname);
console.log(
"------------------host:"
+ p.host);
console.log(
"------------------port: "
+ p.port);
console.log(
"------------------path: "
+ p.path);
console.log(
"------------------hash: "
+ p.hash);
console.log(
"------------------query: "
+ p.query);
console.log(
"------------------pathname: "
+ p.pathname);