Update make_response to support additional data types

Extended the data parameter to accept bytes, bytearray, or None in addition to strings. This ensures greater flexibility and compatibility for response creation.
This commit is contained in:
Chris Busillo
2025-05-07 10:43:44 -04:00
committed by Trinh Anh Ngoc
parent f1d63d2a0d
commit fced266260

View File

@@ -245,7 +245,7 @@ class Request:
def get_json_data(self): ... def get_json_data(self): ...
def make_response( def make_response(
self, self,
data: str, data: str | bytes | bytearray | None,
headers: list[tuple[str, Any]] | None = ..., headers: list[tuple[str, Any]] | None = ...,
cookies: Mapping | None = ..., cookies: Mapping | None = ...,
status: int = ..., status: int = ...,