sample/src/main/java/org/apache/apisix/plugin/runner/filter/PostReqWithVarsFilter.java [39:45]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Override
    public void filter(HttpRequest request, HttpResponse response, PluginFilterChain chain) {
        String configStr = request.getConfig(this);
        Gson gson = new Gson();
        Map<String, Object> conf = new HashMap<>();
        conf = gson.fromJson(configStr, conf.getClass());
        request.setPath((String) conf.get("rewrite_path"));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



sample/src/main/java/org/apache/apisix/plugin/runner/filter/RewriteRequestDemoFilter.java [62:78]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Override
    public void filter(HttpRequest request, HttpResponse response, PluginFilterChain chain) {
        /*
         * If the conf you configured is of type json, you can convert it to Map or json.
         */

        String configStr = request.getConfig(this);
        Gson gson = new Gson();
        Map<String, Object> conf = new HashMap<>();
        conf = gson.fromJson(configStr, conf.getClass());

        /*
         * You can use the parameters in the configuration.
         */

        // note: the path to the rewrite must start with '/'
        request.setPath((String) conf.get("rewrite_path"));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



