code: private URI toURI(String endpoint) throws IllegalArgumentException {
  
          if (endpoint.contains("://") == false) {
              endpoint = Protocol.HTTPS + "://" + endpoint;
          }
  
          try {
              return new URI(endpoint);
          } catch (URISyntaxException e) {
              throw new IllegalArgumentException(e);
          }
      }
docs: Returns the endpoint as a URI.