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 Trịnh Anh Ngọc
parent 6255b4de08
commit 09b25f1396

View File

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