public URI toUri(String scheme, @Nullable String path) {
        requireNonNull(scheme, "scheme");
        scheme = ArmeriaHttpUtil.schemeValidateAndNormalize(scheme);
        try {
            return new URI(scheme, authority, path, null, null);
        } catch (URISyntaxException e) {
            throw new IllegalArgumentException(e.getMessage(), e);
        }
    }
Converts this endpoint into a URI using the {@code scheme} and {@code path}.

@param scheme the {@code scheme} for {@link URI}.
@param path the {@code path} for {@link URI}.

@return the URI
core/src/main/java/com/linecorp/armeria/client/Endpoint.java