Do a synchronous http client fetch within an actix thread
问题 I have an actix endpoint, and I need to do a synchronous http client fetch to get some results, and return some data. My endpoints cannot use async , so I can't use any .await methods. I've tried using reqwests blocking client in my endpoint like so: { ... let res = reqwest::blocking::get(&fetch_url)? .json::<MyResp>()?; ... But it gives me the error: thread 'main' panicked at 'Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block