Created
October 10, 2016 10:10
-
-
Save anonymous/7725d2a56512678ce0c31ed992d5a17c to your computer and use it in GitHub Desktop.
Shared via Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let request_url = "https://some.api/path.json" | |
let client = Client::new(); | |
let mut res = client.get(&request_url).send().unwrap(); | |
assert_eq!(res.status, hyper::Ok); | |
println!("Reading body.."); | |
let mut res_body = String::new(); | |
let result = res.read_to_string(&mut res_body).unwrap(); | |
println!("Done"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment