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 577e5f3583
commit f577a35521

View File

@@ -261,7 +261,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 = ...,