Networking and Internet Modules

http

Defines HTTP status and method enumerations and groups HTTP-related submodules. HTTPStatus members support integer comparison and provide descriptive phrases. Status categories describe protocol outcomes, not whether a business operation succeeded.

Formal Syntax & Structure

python syntaxpython
import http

Return Value

module

Module namespace available through import; import is a statement, not a value-returning expression.

Working Example

Example Snippetpython
from http import HTTPStatusprint(HTTPStatus.NOT_FOUND.value, HTTPStatus.NOT_FOUND.phrase)
Python Reference