Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions stdlib/http/client.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ __all__ = [
_DataType: TypeAlias = SupportsRead[bytes] | Iterable[ReadableBuffer] | ReadableBuffer
_T = TypeVar("_T")
_MessageT = TypeVar("_MessageT", bound=email.message.Message)
_HeaderValue: TypeAlias = ReadableBuffer | str | int

HTTP_PORT: int
HTTPS_PORT: int
Expand Down Expand Up @@ -167,7 +168,7 @@ class HTTPConnection:
method: str,
url: str,
body: _DataType | str | None = None,
headers: Mapping[str, str] = {},
headers: Mapping[str, _HeaderValue] = {},
*,
encode_chunked: bool = False,
) -> None: ...
Expand All @@ -180,7 +181,7 @@ class HTTPConnection:
def connect(self) -> None: ...
def close(self) -> None: ...
def putrequest(self, method: str, url: str, skip_host: bool = False, skip_accept_encoding: bool = False) -> None: ...
def putheader(self, header: str | bytes, *argument: str | bytes) -> None: ...
def putheader(self, header: str | bytes, *values: _HeaderValue) -> None: ...
def endheaders(self, message_body: _DataType | None = None, *, encode_chunked: bool = False) -> None: ...
def send(self, data: _DataType | str) -> None: ...

Expand Down