code: public static URI toHttp(final URI inputUri) throws URISyntaxException {
          Objects.requireNonNull(inputUri, "Input URI must not be null");
          String wsScheme = inputUri.getScheme();
          if ("http".equalsIgnoreCase(wsScheme) || "https".equalsIgnoreCase(wsScheme)) {
              // leave alone
              return inputUri;
          }
  
          if ("ws".equalsIgnoreCase(wsScheme)) {
              // convert to http
              return new URI("http" + inputUri.toString().substring(wsScheme.length()));
          }
  
          if ("wss".equalsIgnoreCase(wsScheme)) {
              // convert to https
              return new URI("https" + inputUri.toString().substring(wsScheme.length()));
          }
  
          throw new URISyntaxException(inputUri.toString(), "Unrecognized WebSocket scheme");
      }
docs: Convert to HTTP <code>http</code> or <code>https</code> scheme URIs.
  <p>
  Converting <code>ws</code> and <code>wss</code> URIs to their HTTP equivalent
  
  @param inputUri the input URI
  @return the HTTP scheme URI for the input URI.
  @throws URISyntaxException if unable to convert the input URI