Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(sdk): say only a 204 drops the content type in request_bytes

Yudhi Armyndharis9a814dcc48e7
diff --git a/sdk/python/openwa/_http.py b/sdk/python/openwa/_http.py
index d9c312173..09ffb7a91 100644
--- a/sdk/python/openwa/_http.py
+++ b/sdk/python/openwa/_http.py
@@ -117,8 +117,9 @@ class HttpExecutor:
self, method: HttpMethod, path: str, *, query: Mapping[str, Any] | None = None
) -> tuple[bytes, str | None]:
"""Perform one request for a non-JSON (binary) 2xx body — e.g. stored
- status media — and return ``(body bytes, content type)``. A 204/empty
- body yields empty bytes and ``None``."""
+ status media — and return ``(body bytes, content type)``. A 204 yields
+ empty bytes and ``None``; any other empty 2xx body yields empty bytes
+ and the served content type."""
res = self._send(method, path, query=query, body=None)
if res.status_code == 204:
return b"", None