Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
2
Task/HTTP/Rust/http-1.rust
Normal file
2
Task/HTTP/Rust/http-1.rust
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[dependencdies]
|
||||
hyper = "0.6"
|
||||
12
Task/HTTP/Rust/http-2.rust
Normal file
12
Task/HTTP/Rust/http-2.rust
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
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