This is a follow-up to my old question. Suppose I need to invoke a REST service both synchronously and asynchronously. In the synchronous case I would like to do it on the caller thread without taking other threads from the pool.
I would like to write my business logic only once and reuse it in the both cases. The business logic consists of building a request and handling the response.
I would like also to compose REST invocations, as if in "invoke service A and then service B and then service C"
How would you do it in Scala ?