openethereum/util/https-fetch/examples/fetch.rs

15 lines
276 B
Rust
Raw Normal View History

2016-08-26 16:35:59 +02:00
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());
}