dls config upload
This commit is contained in:
@@ -77,6 +77,11 @@ impl Client {
|
||||
Ok(resp.bytes_stream())
|
||||
}
|
||||
|
||||
pub async fn upload_config(&self, config: &Config) -> Result<()> {
|
||||
do_req(self.req(Method::POST, "configs")?.json(config), &self.token).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn get_json<T: serde::de::DeserializeOwned>(&self, path: impl Display) -> Result<T> {
|
||||
self.req_json(self.get(&path)?).await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user