clone all files and their content

This commit is contained in:
grimhilt
2023-06-05 15:54:40 +02:00
parent a45c953397
commit 1042a7ea22
4 changed files with 101 additions and 10 deletions

2
src/services/auth.rs Normal file
View File

@@ -0,0 +1,2 @@

View File

@@ -0,0 +1,19 @@
use crate::services::api::ApiBuilder;
use reqwest::{Method, IntoUrl, Response, Error};
pub struct DownloadFiles {
api_builder: ApiBuilder,
}
impl DownloadFiles {
pub fn new<U: IntoUrl>(url: U) -> Self {
DownloadFiles {
api_builder: ApiBuilder::new()
.set_request(Method::GET, url),
}
}
pub async fn send(&mut self) -> Result<Response, Error> {
self.api_builder.send().await
}
}