working
This commit is contained in:
parent
1eb7d4c1eb
commit
35c3f4c423
10 changed files with 353 additions and 738 deletions
|
|
@ -3,10 +3,14 @@ use reqwest::blocking::Client;
|
|||
use reqwest::redirect::Policy;
|
||||
|
||||
pub fn get_wget_list() -> Result<String> {
|
||||
let client = Client::builder().redirect(Policy::none()).build()?;
|
||||
let client = Client::builder().redirect(Policy::limited(5)).build()?;
|
||||
let res = client
|
||||
.get("https://www.linuxfromscratch.org/~thomas/multilib-m32/wget-list-sysv")
|
||||
.send()?
|
||||
.text()?;
|
||||
Ok(res)
|
||||
.send()?;
|
||||
|
||||
if !res.status().is_success() {
|
||||
anyhow::bail!("Failed to fetch wget-list: HTTP {}", res.status());
|
||||
}
|
||||
|
||||
Ok(res.text()?)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue