how do i return the response back to caller asynchronously using a final callback dispatched from on_read handler?
问题 I need to expose an async REST api for c++ clients, that internally uses boost::beast for sending REST requests / receiving responses. The starting point is http_client_async.cpp example. Now the client will pass a callback function using this async api, that needs to be called at the end of the REST operation from the on_read() handler[http_client_async.cpp], passing the full response back to the caller. How can i achieve this? 回答1: but is there any way to invoke thie _callback through asio