feat: add http client
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-01-10 21:42:20 +01:00
parent efec76d28c
commit 8923c60d9e
6 changed files with 242 additions and 163 deletions

View File

@@ -0,0 +1,12 @@
pub struct HttpClient {}
impl HttpClient {
pub fn new() -> Self {
Self {}
}
pub async fn get(&self, url: &str) -> anyhow::Result<Vec<u8>> {
let bytes = reqwest::get(url).await?.bytes().await?;
Ok(bytes.into())
}
}