Can someone provide an example of using Tokio with Reqwest?

It would be nice to have some examples of using Tokio with higher level async crates that a lot of people use like reqwest or rusoto. I can't find any anywhere. Is there a reason for this? I would think using an event loop for http requests would very common.

Specifically, I know how to use Tokio for running a Future to completion, but then using the http response body somewhere else in my program seems hard to understand. What is the simplest pattern for this?

You can look at example directory of reqwest. But how you handle result of reqwest is depend on you and what you want. In my case I use json future plus serde to convert http repsonce into value of Rust type and then (with and_then :slight_smile: ) I call callback to inform main part of main program that data arrived.