5
starałem się wyświetlać zawartość (korpus) z adresu URL jako tekst za pomocą HyperWyświetlanie treść odpowiedzi z Hyper pokazuje tylko rozmiar ciała
extern crate hyper;
use hyper::client::Client;
use std::io::Read;
fn main() {
let client = Client::new();
let mut s = String::new();
let res = client.get("https://www.reddit.com/r/programming/.rss")
.send()
.unwrap()
.read_to_string(&mut s)
.unwrap();
println!("Result: {}", res);
}
Ale działa ten skrypt tylko zwraca rozmiar ciała :
Result: 22871
Co zrobiłem źle? Czy coś źle zrozumiałem?
haha oops! Nie przeczytałem ponownie mojego kodu! –