This commit is contained in:
12
crates/churn/src/agent/plugins/http.rs
Normal file
12
crates/churn/src/agent/plugins/http.rs
Normal 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())
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user