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

How get upstream responses whole body,not only header or statusCode

Open dargoner opened this issue 2 years ago • 8 comments

Issue description

How get upstream responses whole body,not only header or statusCode

Environment

  • your apisix-java-plugin-runner version

dargoner avatar Jul 26 '22 18:07 dargoner

Hope to provide function

PostFillter postRequest.getUpstreamResponseBody()

dargoner avatar Jul 26 '22 18:07 dargoner

No support yet. We need to wait for APISIX to complete this feature before we can support it.

tzssangglass avatar Jul 27 '22 01:07 tzssangglass

response-rewrite lua has method " local body = core.response.hold_body_chunk(ctx)" get response body。but i only do Java.

dargoner avatar Jul 27 '22 13:07 dargoner

response-rewrite has nothing to do with the plugin runner, they are not the same thing.

tzssangglass avatar Jul 28 '22 03:07 tzssangglass

0.3.0版本还是没有支持获取上游响应的body,我也需要这个功能

beginnerWJC avatar Aug 22 '22 01:08 beginnerWJC

this when APISIX complete this feature?

DREZG avatar Aug 22 '22 11:08 DREZG

need too. At the same time, it is necessary to support body rewriting before the request reaches the upstream

fitz-97 avatar Aug 23 '22 06:08 fitz-97

Already supported, refer to: https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#get-the-upstream-response-and-process

soulbird avatar Apr 24 '23 12:04 soulbird