code: function signatureBaseStringURI (uri) {
    var url = URL.parse(uri, true)
    var protocol = url.protocol
    var hostname = url.hostname
    var pathname = url.pathname
    var port = ''
    var result = ''
  
    if (url.port) {
      if ((protocol === 'http:' && url.port !== '80') ||
        (protocol === 'https:' && url.port !== '443')) {
        port = ':' + url.port
      }
    }
  
    if (!pathname || pathname === '') {
      pathname = '/'
    }
  
    result += protocol
    result += '//'
    result += hostname
    result += port
    result += pathname
    return result
  }
docs: Signature Base String URI
  https://tools.ietf.org/html/rfc5849#section-3.4.1.1
  https://tools.ietf.org/html/rfc5849#section-3.4.1.2