From 936859aedeb34f1b22ef64757580c370ae13b58b Mon Sep 17 00:00:00 2001 From: zach Date: Fri, 8 Nov 2024 15:48:09 -0800 Subject: [PATCH] fix: expose http headers --- lib/src/prelude.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/prelude.py b/lib/src/prelude.py index 69ac0ad..c7c2aa1 100644 --- a/lib/src/prelude.py +++ b/lib/src/prelude.py @@ -354,6 +354,10 @@ def data_json(self): """Get response body JSON""" return json.loads(self.data_str(), cls=JSONDecoder) + def headers(self): + """Get HTTP response headers""" + return self._inner.headers or {} + class Http: @staticmethod