public static String getCodecQuery(final ServerWebExchange exchange) {
        MultiValueMap<String, String> queryParams = exchange.getRequest().getQueryParams();
        return queryParams.keySet().stream()
                .map(key -> queryParams.get(key).stream()
                        .map(item -> Optional.ofNullable(item)
                                .map(value -> String.join("=",
                                        UriUtils.encode(key, StandardCharsets.UTF_8),
                                        UriUtils.encode(value, StandardCharsets.UTF_8)))
                                .orElse(UriUtils.encode(key, StandardCharsets.UTF_8)))
                        .filter(StringUtils::isNoneBlank)
                        .collect(Collectors.joining("&")))
                .collect(Collectors.joining("&")).trim();
    }
Gets codec query string.

@param exchange the exchange
@return codec query string
shenyu-plugin/shenyu-plugin-api/src/main/java/org/apache/shenyu/plugin/api/utils/RequestQueryCodecUtil.java