From 53d092c20d55c66d769fde4384c0c6272674e480 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Mon, 13 Mar 2023 09:24:04 -0700 Subject: [PATCH] Log network responses in rust --- library/src/network.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/src/network.rs b/library/src/network.rs index d2db4f4..90e2b3a 100644 --- a/library/src/network.rs +++ b/library/src/network.rs @@ -13,14 +13,14 @@ fn patches_check_url(base_url: &str) -> String { return format!("{}/api/v1/patches/check", base_url); } -#[derive(Deserialize)] +#[derive(Debug, Deserialize)] pub struct Patch { pub version: String, pub hash: String, pub download_url: String, } -#[derive(Deserialize)] +#[derive(Debug, Deserialize)] pub struct PatchCheckResponse { pub patch_available: bool, #[serde(default)] @@ -67,5 +67,6 @@ pub fn send_patch_check_request( .json(&body) .send()? .json()?; + info!("Patch check response: {:?}", response); return Ok(response); }