From ef63f18a77a1fb5fe71b29b3237da0f7833908a8 Mon Sep 17 00:00:00 2001 From: jane400 Date: Tue, 17 Sep 2024 19:19:36 +0200 Subject: [PATCH] feat: utils: add generic cookie adder --- libpaket/src/utils.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libpaket/src/utils.rs b/libpaket/src/utils.rs index 632a23b..7f0d9b8 100644 --- a/libpaket/src/utils.rs +++ b/libpaket/src/utils.rs @@ -26,6 +26,13 @@ impl CookieHeaderValueBuilder { self } + pub fn add_key_value(mut self, key: String, value: String) -> Self { + self.list + .push((key, value)); + + self + } + pub fn build_string(self) -> String { let name_value = self .list