code: function getOAuth1BaseUrl (url) {
      var port = url.port ? url.port : undefined,
          host = ((port === HTTP_PORT ||
              port === HTTPS_PORT ||
              port === undefined) && url.hostname) || url.host,
          path = url.pathname,
  
          // trim to convert 'http:' from Node's URL object to 'http'
          protocol = _.trimEnd(url.protocol || PROTOCOL_HTTP, PROTOCOL_SEPARATOR);
  
      protocol = (_.endsWith(protocol, PROTOCOL_SEPARATOR) ? protocol : protocol + PROTOCOL_SEPARATOR);
  
      return protocol.toLowerCase() + host.toLowerCase() + path;
  }
docs: Returns a OAuth1.0-a compatible representation of the request URL, also called "Base URL".
  For details, http://oauth.net/core/1.0a/#anchor13
  
  todo: should we ignore the auth parameters of the URL or not? (the standard does not mention them)
  we currently are.
  
  @private
  @param {Url} url - Node's URL object
  @returns {String}