code: function(url) {
  		var ports = { // we ignore default ports
  			http: 80,
  			https: 443
  		}
  		, urlp = parseUrl(url)
  		;
  
  		return urlp.scheme + '://' + urlp.host + (urlp.port !== ports[urlp.scheme] ? ':' + urlp.port : '') + urlp.path + (urlp.query ? urlp.query : '');
  	}
docs: Resolve url - among other things will turn relative url to absolute
  
  @method resolveUrl
  @static
  @param {String} url Either absolute or relative
  @return {String} Resolved, absolute url