我正在尝试在此处描述的 AWS API Gateway 中实现 API 组合 https://microservices.io/patterns/data/api-composition.html
在发送响应之前,我必须对不同的模块进行两次调用。
在我看来,我可以添加多个集成请求并使用模板映射加入结果,但我找不到任何文档,也没有人做过。
我弄错了吗?
我是否应该在应用程序中创建自己的组合层,而 API 网关的角色只是指向它?
最佳答案
I don't think API gateway support this behaviour.
您将需要实现自己的组合层来 fork 您的请求并合并响应
关于amazon-web-services - 使用 AWS Api Gateway 进行 Api 组合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61785330/