4

I'm using ocelot as an API Gateway, and I'm trying to send an HTTP POST request from the client, which would be sent to multiple services, and their responses should be aggregated and returned to the client. It has been mentioned on Ocelot's docs that its request aggregation only supports GET, so I have used the HttpClientFactory to send multiple requests asynchronously and concatenate their JSON responses manually. Is there any better way to achieve this?

API Gateway POST Responses Aggregation

Muizz Mahdy
  • 798
  • 2
  • 8
  • 24
  • 1
    It will always depend on the architecture that you selected for your app, but it seems a good choice, also you can follow this pattern implementation on official Microsoft docs. [link](https://learn.microsoft.com/en-us/dotnet/architecture/microservices/multi-container-microservice-net-applications/implement-api-gateways-with-ocelot#the-gateway-aggregation-pattern-in-eshoponcontainers) – Jesus Santander Dec 13 '19 at 13:05

0 Answers0