public OptionalInt port() {
        return port == -1 ? OptionalInt.empty() : OptionalInt.of(port);
    }
Returns a copy of this with all entries of the query appended.
vespajlib/src/main/java/ai/vespa/http/HttpURL.java