From 70bdfede77109c2e7d7eff7aa4f123b78f82ca3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Gr=C3=BCnewald?= Date: Mon, 1 Jan 2024 21:50:57 +0100 Subject: [PATCH] Add tags support --- src/client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client.rs b/src/client.rs index af44784..6eb4de4 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,4 +1,3 @@ -use std::io::Write; use anyhow::Result; use base64::Engine; use base64::engine::{GeneralPurpose}; @@ -53,11 +52,12 @@ impl<'a> Client<'a> { if let Some(tags) = tags { if tags.len() > 0 { - query_params.push_str("tags="); - query_params.push_str(tags.join(",").as_str()); + query_params.push(format!("tags={}", tags.join(","))); } } + url.set_query(Some(&query_params.join("&"))); + Ok(self.http_client.get(url.as_str()) .send() .await?