diff options
Diffstat (limited to 'src/upnp.rs')
| -rw-r--r-- | src/upnp.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/upnp.rs b/src/upnp.rs index 7a228b6..8eeac00 100644 --- a/src/upnp.rs +++ b/src/upnp.rs @@ -49,26 +49,18 @@ fn fetch_url(url: hyper::Uri) -> impl Future<Item=(), Error=()> { let client = Client::new(); client - // Fetch the url... .get(url) - // And then, if we get a response back... .and_then(|res| { println!("Response: {}", res.status()); println!("Headers: {:#?}", res.headers()); - - // The body is a stream, and for_each returns a new Future - // when the stream is finished, and calls the closure on - // each chunk of the body... res.into_body().for_each(|chunk| { io::stdout().write_all(&chunk) .map_err(|e| panic!("example expects stdout is open, error={}", e)) }) }) - // If all good, just tell the user... .map(|_| { println!("\n\nDone."); }) - // If there was an error, let the user know... .map_err(|err| { eprintln!("Error {}", err); }) |
