Closed 0xJepsen closed 9 months ago
I am not sure, if I understand correctly what you are suggesting... if you use the blocking feature, you cN already avoid the use of async in your code.
Let me try to explain a little better. Right now if i use this API, the async
propagates up which makes everything that calls it async. Some people have called this a "red function" as described here. If instead on the send here
https://github.com/xemwebe/yahoo_finance_api/blob/7652601c6dc079cdc685348a5ff0cb56303d094f/src/async_impl.rs#L80-L87
you used the request
crate your function can be blue and not propagate the async
then you can do things like
let resp = reqwest::blocking::get(url);
Would you be open to this change? If so I would maybe be interested in working on it
After taking a closer look, i see you already support this with the blocking feature! Amazing
would you be open to using the request crate to allow for the http library to not bubble everything up to be async?
then you can do things like