diff options
author | fx <[email protected]> | 2023-10-21 17:43:31 +0200 |
---|---|---|
committer | fx <[email protected]> | 2023-10-21 17:43:31 +0200 |
commit | 8fab2e7c3a38a91c8f5549b639e7f2ac4ae1a420 (patch) | |
tree | 09a886de17d8dc5e36d89068828380e936b47650 /src/requests/get.rs | |
parent | eb0a092fc53964e02a09da2d92a1f8a3042a1360 (diff) | |
download | webol-cli-8fab2e7c3a38a91c8f5549b639e7f2ac4ae1a420.tar webol-cli-8fab2e7c3a38a91c8f5549b639e7f2ac4ae1a420.tar.gz webol-cli-8fab2e7c3a38a91c8f5549b639e7f2ac4ae1a420.zip |
added device add and update
Diffstat (limited to 'src/requests/get.rs')
-rw-r--r-- | src/requests/get.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/requests/get.rs b/src/requests/get.rs deleted file mode 100644 index 225562d..0000000 --- a/src/requests/get.rs +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | use crate::{error::CliError, config::SETTINGS, default_headers}; | ||
2 | |||
3 | pub fn get(id: String) -> Result<(), CliError> { | ||
4 | let res = reqwest::blocking::Client::new() | ||
5 | .get( | ||
6 | format!( | ||
7 | "{}/start", | ||
8 | SETTINGS.get_string("server").map_err(CliError::Config)? | ||
9 | ) | ||
10 | ) | ||
11 | .headers(default_headers()?) | ||
12 | .body( | ||
13 | format!(r#"{{"id": "{}"}}"#, id) | ||
14 | ) | ||
15 | .send() | ||
16 | .map_err(CliError::Reqwest)? | ||
17 | .text(); | ||
18 | |||
19 | println!("{:?}", res); | ||
20 | Ok(()) | ||
21 | } | ||