docs: private int getPort(URI endpoint) {
          if (endpoint.getPort() != -1) {
              return endpoint.getPort();
          } else if ("https".equals(endpoint.getScheme())) {
              return 443;
          } else {
              return 80;
          }
      }