I have some data in my program (which is a web server using
tide) that I want to periodically update from another http server. So I try to
async_std::task::spawn a function to fetch the data and replace my local data.
Currently, I use
hreq to do the actual fetching. But that means that inside my task, there is a
hreq::ResponseFuture to await, and that is not
So I guess I have two alternative questions:
- Is there a way to get around this, by somehow localizing the
ResponseFutureto execute in a single thread or someting? a section of the async book seems to say there isn't, and that kind of makes sense.
- Is there a http client crate that works with
async-stdwhere the request and response types is
Sendso it can be used in a task?