kjuulh 8923c60d9e
All checks were successful
continuous-integration/drone/push Build is passing
feat: add http client
2025-01-10 21:42:35 +01:00

13 lines
256 B
Rust

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())
}
}