apisix-java-plugin-runner icon indicating copy to clipboard operation
apisix-java-plugin-runner copied to clipboard

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

Open forget99 opened this issue 2 years ago • 2 comments

Issue description

How can i modify the request body with java plugin?

Environment

  • your apisix-java-plugin-runner version:0.4.0

forget99 avatar Jun 25 '23 08:06 forget99

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

can you help me see? thank you very much

forget99 avatar Jun 25 '23 09:06 forget99

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

gaoxingliang avatar Nov 20 '23 08:11 gaoxingliang