Group requests into a single request

For clients not supporting HTTP/2, but the slower HTTP/1.1, request grouping is one of the 'best practises' to improve performance.
This is a demonstration on how to group requests, if you support HTTP/1.1 as a fallback.

More info: https://www.developer.saxo/openapi/learn/batching-requests
Looking for a way to unpack the batch requests? This is the example: https://saxobank.github.io/openapi-samples-js/batch-request/batch-request-decomposer/.

POST body containing requests:


Response:
Click button to launch function.

JS code:
Click button to show code.