You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "exsaviour (via GitHub)" <gi...@apache.org> on 2023/06/12 13:47:59 UTC
[GitHub] [apisix] exsaviour commented on issue #9642: help request: How to manipulate the response body?
exsaviour commented on issue #9642:
URL: https://github.com/apache/apisix/issues/9642#issuecomment-1587379636
Hello,
It's not working, here's the code:
```
res_template=$(cat <<EOF
{%
%}
{*ngx.arg[1]*}
{*ngx.arg[2]*}
EOF
)
echo "Creating Response Transformer Plugin"
plugin_config_payload='{
"desc": "Response Transformation Plugin",
"plugins": {
"body-transformer": {
"response": {
"input_format": "json",
"template": "'"$res_template"'"
}
}
}
}'
```
The first ngx argument is showing empty space and the second is showing the true boolean flag.
It seems as though I am trying to access the body at a point where it is no longer there but at the same time, I am using the body transformer plug-in, so I should be able to get it.
Reference:
https://apisix.apache.org/docs/apisix/plugins/body-transformer/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org