From 344af3ff7c9493b4e2c6eee134b9b341eaabf736 Mon Sep 17 00:00:00 2001 From: FxQnLr Date: Tue, 7 Nov 2023 12:58:12 +0100 Subject: add ping support and readable output --- src/requests/device.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/requests/device.rs') 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 @@ use crate::{error::CliError, default_headers, format_url, Protocols}; pub async fn put(id: String, mac: String, broadcast_addr: String, ip: String) -> Result<(), CliError> { + let url = format_url("device", Protocols::Http)?; + println!("{}", url); let res = reqwest::Client::new() - .put(format_url("device", Protocols::Http)?) + .put(url) .headers(default_headers()?) .body( format!( -- cgit v1.2.3