public URI addParameter(String name, String value) {
        String newRest = rest;

        if (newRest == null) {
            newRest = "";
        }
        if ( newRest.contains("?")) {
            newRest += "&";
        } else {
            newRest += "?";
        }
        newRest += name + "=" + value;
        return new URI(scheme, host, port, newRest);
    }
Returns a new uri with the an additional parameter
vespajlib/src/main/java/com/yahoo/net/URI.java