hn front page and fanclub working
This commit is contained in:
10
src/http.rs
Normal file
10
src/http.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
use reqwest::blocking;
|
||||
|
||||
pub fn get(url: &str) -> Option<String> {
|
||||
if let Ok(resp) = blocking::get(url) {
|
||||
if let Ok(text) = resp.text() {
|
||||
return Some(text);
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
Reference in New Issue
Block a user