src/index.js
function getHref(httpOptions) {
  if (httpOptions.uri && httpOptions.uri.href) {
    return httpOptions.uri.href;
  } else if (httpOptions.hostname && httpOptions.path) {
    return httpOptions.hostname + httpOptions.path;
  } else if (httpOptions.host && httpOptions.path) {
    return httpOptions.host + httpOptions.path;
  }
  return 'Unknown';
}
function getHref(httpOptions) {
  if (httpOptions.uri && httpOptions.uri.href) {
    return httpOptions.uri.href;
  } else if (httpOptions.hostname && httpOptions.path) {
    return httpOptions.hostname + httpOptions.path;
  } else if (httpOptions.host && httpOptions.path) {
    return httpOptions.host + httpOptions.path;
  }
  return 'Unknown';
}
function getHref ( httpOptions ) { if ( httpOptions . uri && httpOptions . uri . href ) { return httpOptions . uri . href ; } else if ( httpOptions . hostname && httpOptions . path ) { return httpOptions . hostname + httpOptions . path ; } else if ( httpOptions . host && httpOptions . path ) { return httpOptions . host + httpOptions . path ; } return 'Unknown' ; }
Get the href from an HTTP options objet.
Supports multiple types of options.
@param  {object} httpOptions
@return {string} the hostname or "Unknown" if not found.
Get the href from an HTTP options objet . Supports multiple types of options .