This is an automated email from the ASF dual-hosted git repository. membphis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push: new e836474 docs(dubbo): describe the returned data requirement (#3829) e836474 is described below commit e8364746cadbf1cc4bc3a577ed025f9a727ed3bf Author: 罗泽轩 <spacewander...@gmail.com> AuthorDate: Tue Mar 23 20:00:34 2021 +0800 docs(dubbo): describe the returned data requirement (#3829) --- docs/en/latest/plugins/dubbo-proxy.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/en/latest/plugins/dubbo-proxy.md b/docs/en/latest/plugins/dubbo-proxy.md index 59586b8..9b619d5 100644 --- a/docs/en/latest/plugins/dubbo-proxy.md +++ b/docs/en/latest/plugins/dubbo-proxy.md @@ -100,6 +100,31 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f1 You can follow the [Quick Start](https://github.com/alibaba/tengine/tree/master/modules/mod_dubbo#quick-start) example in Tengine and use the configuration above to test it. They should provide the same result. +The returned data from upstream dubbo service must be a `Map<String, String>`. + +If the returned data is + +```json +{ + "status": "200", + "header1": "value1", + "header2": "valu2", + "body": "blahblah" +} +``` + +the converted HTTP response will be + +``` +HTTP/1.1 200 OK # "status" will be the status code +... +header1: value1 +header2: value2 +... + +blahblah # "body" will be the body +``` + ## Disable Plugin When you want to disable the dubbo-proxy plugin on a route/service, it is very simple,