diff options
Diffstat (limited to 'src/requests/device.rs')
-rw-r--r-- | src/requests/device.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/requests/device.rs b/src/requests/device.rs index f7754a4..cbc838e 100644 --- a/src/requests/device.rs +++ b/src/requests/device.rs | |||
@@ -1,8 +1,10 @@ | |||
1 | use crate::{error::CliError, default_headers, format_url, Protocols}; | 1 | use crate::{error::CliError, default_headers, format_url, Protocols}; |
2 | 2 | ||
3 | pub async fn put(id: String, mac: String, broadcast_addr: String, ip: String) -> Result<(), CliError> { | 3 | pub async fn put(id: String, mac: String, broadcast_addr: String, ip: String) -> Result<(), CliError> { |
4 | let url = format_url("device", Protocols::Http)?; | ||
5 | println!("{}", url); | ||
4 | let res = reqwest::Client::new() | 6 | let res = reqwest::Client::new() |
5 | .put(format_url("device", Protocols::Http)?) | 7 | .put(url) |
6 | .headers(default_headers()?) | 8 | .headers(default_headers()?) |
7 | .body( | 9 | .body( |
8 | format!( | 10 | format!( |