openethereum/util/https-fetch/examples/fetch.rs
2016-08-31 11:22:25 +02:00

13 lines
247 B
Rust

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