http.client.HTTPConnection.request accepts str as the body (#9322)

See code around ab02262cd0/Lib/http/client.py (L1328)
This commit is contained in:
Jelle Zijlstra
2022-12-02 10:49:33 -08:00
committed by GitHub
parent bc1da6a748
commit 00483b63e6

View File

@@ -154,7 +154,13 @@ class HTTPConnection:
blocksize: int = ...,
) -> None: ...
def request(
self, method: str, url: str, body: _DataType | None = ..., headers: Mapping[str, str] = ..., *, encode_chunked: bool = ...
self,
method: str,
url: str,
body: _DataType | str | None = ...,
headers: Mapping[str, str] = ...,
*,
encode_chunked: bool = ...,
) -> None: ...
def getresponse(self) -> HTTPResponse: ...
def set_debuglevel(self, level: int) -> None: ...