diff options
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 | } | ||