apache / apisix-java-plugin-runner

APISIX Plugin Runner in Java
https://apisix.apache.org/
Apache License 2.0
126 stars 95 forks source link

request help: How can i modify the request body with java plugin? #252

Open forget99 opened 1 year ago

forget99 commented 1 year ago

Issue description

How can i modify the request body with java plugin?

Environment

forget99 commented 1 year ago

request.setBody(bodyStr),this method is not effective。

can you help me see? thank you very much

gaoxingliang commented 8 months ago

you can try the solution here: https://github.com/gaoxingliang/apisix-java-plugin-runner/blob/encrypt-response/runner-starter/src/main/java/org/apache/apisix/plugin/runner/filter/DecryptRequestFilter.java#L78 This depends on the source code change by adding a new method changeBody to make it work. and the readme: https://github.com/gaoxingliang/apisix-java-plugin-runner/blob/encrypt-response/readme-new.md