Get Sync request (without tokio) #2550
-
Is it possible to get response without async context? let content = reqwest::get("http://example.com/feed.xml")
.await?
.bytes()
.await?; something like that: let content = reqwest::get_sync("http://example.com/feed.xml")
.bytes(); |
Beta Was this translation helpful? Give feedback.
Answered by
seanmonstar
Feb 11, 2025
Replies: 1 comment 1 reply
-
There is a blocking feature in reqwest: https://docs.rs/reqwest/latest/reqwest/blocking/index.html |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
d47081
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a blocking feature in reqwest: https://docs.rs/reqwest/latest/reqwest/blocking/index.html