Is there a user friendly @rustlang async HTTP client out there?
-
Show this thread
-
Replying to @louispilfold @rustlang
I've used Reqwest before, it's a higher level client built on Hyper. I remember struggling a bit with the async stuff though. I'm basically staying away from rust until async/await is "done"
1 reply 0 retweets 3 likes -
I'm not the very knowledgeable but it seems like the async await syntax is just sugar? Now that Futures are stable I _think_ we may be there (so long as you're happy with and_then, map etc) Hyper without Reqwest actually looks simpler than with?https://github.com/hyperium/hyper/blob/master/examples/client_json.rs …
1 reply 0 retweets 0 likes -
Of course I'm probably totally wrong
2 replies 0 retweets 0 likes -
Replying to @louispilfold @joladev
You’re close; “it’s sugar for futures” is a good mental model, even if not 100% accurate. The feature still needs some work, which is why it’s not stable yet; it’s currently targeted for 1.28
1 reply 0 retweets 3 likes -
thank you!
Is there a place to learn the difference between async/await and Futures? I should wait for the async book, right?2 replies 0 retweets 2 likes
Yes, that will be the best resource. The short answer is “async fns return a future, and you can .await any future inside of an async fn. but the compiler will do a better job of the lifetimes with async/await than raw futures.”
-
-
The Rust Twitter continues to be as helpful and friendly as the Rust compiler :)
0 replies 0 retweets 10 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.