code: function getURLFromRequest(request) {
  	const queryString = makeQueryString(request.query || {});
  	let formatted = request.route;
  	let value;
  	let regexp;
  
  	// Replace route params with their values. If the route param is specified
  	// with an extension (e.g., ':id.json'), keep the extension.
  	Object.keys(request.params || {}).forEach((name) => {
  		value = request.params[name];
  		regexp = new RegExp(':' + name + '(?=(?:\\.|\\/|$|\\?))');
  		formatted = formatted.replace(regexp, value);
  	});
  
  	return formatted + (queryString ? '?' + queryString : '');
  }
docs: Combine the route/params/query of a request into a complete URL
  
  @param {request} request
  @param {object|array} request.query
  @return {string} url