From bd7602294505290c8ad0139d7768d6831a05aa8c Mon Sep 17 00:00:00 2001 From: Alex Hall Date: Mon, 23 Dec 2024 16:31:07 +0200 Subject: [PATCH] More explicit naming --- logfire/_internal/integrations/httpx.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/logfire/_internal/integrations/httpx.py b/logfire/_internal/integrations/httpx.py index 97f1f337..0dcbc60d 100644 --- a/logfire/_internal/integrations/httpx.py +++ b/logfire/_internal/integrations/httpx.py @@ -177,7 +177,7 @@ def body_is_streaming(self): return not isinstance(self.stream, httpx.ByteStream) @property - def content_type_header(self) -> ContentTypeHeader: + def content_type_header_object(self) -> ContentTypeHeader: return content_type_header_from_string(self.content_type_header_string) @property @@ -194,8 +194,8 @@ def content_type_is_form(self): return content_type == 'application/x-www-form-urlencoded' @property - def charset(self): - return self.content_type_header.params.get('charset', 'utf-8') + def content_type_charset(self): + return self.content_type_header_object.params.get('charset', 'utf-8') @property def content(self) -> bytes: @@ -205,7 +205,7 @@ def content(self) -> bytes: @property def text(self) -> str: - return decode_body(self.content, self.charset) + return decode_body(self.content, self.content_type_charset) @property def form_data(self) -> Mapping[str, Any] | None: