-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reqwest panics due to not currently running on the Tokio runtime.
regardless of async runtime
#1108
Comments
reqwest currently needs Tokio v0.2. |
Do I understand correctly, reqwest async can only work when run in a tokio 0.2 runtime? Not in smol, not in something else? |
That is the current situation, yes. Reqwest will upgrade to support newer Tokio soon. |
Well, this is kind of important information. I did not find a single mention of tokio at all (in the main README). I just saw a relatively common http library which is async capable, so I went for it. I think it would be fair to provide a big warning, something like
That stops users from having wrong expectations. I feel a little betrayed; I wasted time implementing with this. I would not have chosen this lib If it hat been clearly communicated how delicate the compatibility is. |
If you just want to send several requests, you can use |
I first had my code ran in
smol
, and got that error. I then quickly changed totokio
, but the error persisted. Something is clearly off here. Even if my code is wrong, this panic message is not very helpful to me.Any idea what the issue could be?
I'm not really doing much there with
reqwest
, just a client that makes a handful of requests and parses the result as JSON. Here is the backtrace from the current code (with tokio):The text was updated successfully, but these errors were encountered: