public UriBuilder withPath(String path) {
        try {
            return new UriBuilder(new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(),
                                   uri.getPort(), path, uri.getQuery(), uri.getFragment()));
        }
        catch (URISyntaxException e) {
            throw new IllegalArgumentException("Could not add path '" + path + "' to " + this);
        }
    }
Returns a uri with the given path appended and all parameters removed
container-core/src/main/java/com/yahoo/restapi/UriBuilder.java