openethereum/util/https-fetch/examples/fetch.rs
2016-08-29 16:34:37 +02:00

15 lines
276 B
Rust

extern crate https_fetch;
use std::io;
use https_fetch::*;
fn main() {
let client = Client::new().unwrap();
let rx = client.fetch(Url::new("github.com", 443, "/").unwrap(), Box::new(io::stdout())).unwrap();
let result = rx.recv().unwrap();
assert!(result.is_ok());
}