Optional<URI> proxy() throws CliArgumentsException {
        try {
            URL url = (URL) arguments.getParsedOptionValue(PROXY_OPTION);
            if (url == null) return Optional.empty();
            return Optional.of(url.toURI());
        } catch (ParseException | URISyntaxException e) {
            throw new CliArgumentsException("Invalid proxy: " + e.getMessage(), e);
        }
    }
Parses command line arguments

@author bjorncs
vespa-feed-client-cli/src/main/java/ai/vespa/feed/client/impl/CliArguments.java