diff --git a/stdlib/http/__init__.pyi b/stdlib/http/__init__.pyi index 822cc0932939..c74d914268b3 100644 --- a/stdlib/http/__init__.pyi +++ b/stdlib/http/__init__.pyi @@ -2,7 +2,24 @@ import sys from enum import IntEnum from typing_extensions import Literal -__all__ = ["HTTPStatus"] +if sys.version_info >= (3, 11): + __all__ = ["HTTPStatus", "HTTPMethod"] +else: + __all__ = ["HTTPStatus"] + +if sys.version_info >= (3, 11): + from enum import StrEnum + + class HTTPMethod(StrEnum): + GET: str + HEAD: str + POST: str + PUT: str + DELETE: str + CONNECT: str + OPTIONS: str + TRACE: str + PATCH: str class HTTPStatus(IntEnum): @property