Refer to: http://nodejs.org/api/url.html

we can simply make a function like this
```
var url = require('url');
function getUrlObj(urlPath) {
  return url.parse(urlPath);
}
```