forked from mirror/async-std
Remove surf example
Doesn't build on mac
This commit is contained in:
parent
c3a52c2ff3
commit
e8e82c6b71
2 changed files with 0 additions and 22 deletions
|
@ -38,5 +38,4 @@ slab = "0.4.2"
|
|||
|
||||
[dev-dependencies]
|
||||
femme = "1.1.0"
|
||||
surf = "1.0.1"
|
||||
tempdir = "0.3.7"
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
//! Creates a HTTP request to the official Rust website.
|
||||
|
||||
#![feature(async_await)]
|
||||
|
||||
use async_std::task;
|
||||
|
||||
fn main() -> Result<(), surf::Exception> {
|
||||
task::block_on(async {
|
||||
let url = "https://www.rust-lang.org";
|
||||
let mut response = surf::get(url).await?;
|
||||
let body = response.body_string().await?;
|
||||
|
||||
dbg!(url);
|
||||
dbg!(response.status());
|
||||
dbg!(response.version());
|
||||
dbg!(response.headers());
|
||||
dbg!(body.len());
|
||||
|
||||
Ok(())
|
||||
})
|
||||
}
|
Loading…
Reference in a new issue