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

See code around https://github.com/python/cpython/blob/ab02262cd0385a2fb5eb8a6ee3cedd4b4bb969f3/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
+7 -1
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: ...