From 1d6bbe5b57f98e2285b108e2f215e5d9fbf5608d Mon Sep 17 00:00:00 2001 From: Dinis Cruz Date: Tue, 29 Oct 2024 14:53:58 +0000 Subject: [PATCH] added set_cookies method --- osbot_fast_api/utils/Fast_API__Request.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osbot_fast_api/utils/Fast_API__Request.py b/osbot_fast_api/utils/Fast_API__Request.py index cb98f89..2d654d7 100644 --- a/osbot_fast_api/utils/Fast_API__Request.py +++ b/osbot_fast_api/utils/Fast_API__Request.py @@ -41,6 +41,11 @@ def set_cookie(self, key, value): self.set_header('cookie', f'{key}={value}') return self + def set_cookies(self, items): + for key, value in items: + self.set_header('cookie', f'{key}={value}') + return self + def set_header(self, key, value): self.scope_headers[key] = value return self