mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
Have a user agent for online PCI ID database updating
This commit is contained in:
@@ -180,7 +180,13 @@ impl Daemon {
|
||||
}
|
||||
|
||||
fn get_pci_db_online() -> Result<PciDatabase, reqwest::Error> {
|
||||
let vendors = reqwest::blocking::get("https://pci.endpoint.ml/devices.json")?.json()?;
|
||||
let client = reqwest::blocking::Client::builder()
|
||||
.user_agent("LACT")
|
||||
.build()?;
|
||||
let vendors = client
|
||||
.get("https://pci.endpoint.ml/devices.json")
|
||||
.send()?
|
||||
.json()?;
|
||||
Ok(PciDatabase { vendors })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user