yunduansing opened a new issue, #8285:
URL: https://github.com/apache/apisix/issues/8285
### Description
1.upstream body may response:
`{
"data": [],
"total": 100
}
`
http status code: 200
**then I want to rewrite it like :**
`{
"data":{ "data": [],"total": 100} ,
"errcode": 0
}
`
http status code: 200
2.upstream body may response:
`
"Internal error."
`
http status code: 500
**then I want to rewrite it like :**
`{
"msg": "Internal error.",
"errcode": 500,
"data": null
}
`
http status code: 200
I want to know how to do it when I use the default response-rewrite plugin
### Environment
- APISIX version (run `apisix version`):
- Operating system (run `uname -a`):
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
- etcd version, if relevant (run `curl
http://127.0.0.1:9090/v1/server_info`):
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`):
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]