Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
14
Task/HTTP/Rust/http-2.rs
Normal file
14
Task/HTTP/Rust/http-2.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
//cargo-deps: hyper="0.6"
|
||||
// The above line can be used with cargo-script which makes cargo's dependency handling more convenient for small programs
|
||||
extern crate hyper;
|
||||
|
||||
use std::io::Read;
|
||||
use hyper::client::Client;
|
||||
|
||||
fn main() {
|
||||
let client = Client::new();
|
||||
let mut resp = client.get("http://rosettacode.org").send().unwrap();
|
||||
let mut body = String::new();
|
||||
resp.read_to_string(&mut body).unwrap();
|
||||
println!("{}", body);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue