Combining multiple API requests into a single batch request #2879
Unanswered
meinemitternacht
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I'm working on porting a very large API project written in PHP to Rust, and I'm trying to find a replacement for our in-house request grouping that worked out well in PHP. Basically, the client (GUI) will collect the endpoints it needs for the current view into a single array of requests and POST this as a JSON object with a special header (
x-batch-request
, for example). The API would then take this request, split it into the individual requests, route them to their controllers, and combine all of the responses into a single JSON object.Yes, I know this sounds similar to GraphQL, but due to a lot of external factors I have not put a lot of consideration into adopting that for our use case.
Is there a way to do this with Actix, apart from just having the API reverse-proxy itself?
Request:
Response:
Beta Was this translation helpful? Give feedback.
All reactions