On this page
  1. http.HTTPMethod
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

http.HTTPMethod

Up: http | Next: http.HTTPStatus
Rel: http.HTTPStatus
Ref: docs.python.org — http.HTTPMethod
Tags: #public #python3 #stdlib #http


Import

import http
from http import HTTPMethod

Signature & Overview

http.HTTPMethod(*values)

HTTP methods and descriptions Methods from the following RFCs are all observed: * RFC 9110: HTTP Semantics, obsoletes 7231, which obsoleted 2616

Methods & Attributes

Usage

from http import HTTPMethod

assert HTTPMethod.GET == "GET"
assert HTTPMethod.POST.description.startswith("Perform")

Gotchas

REPL Inspect

from http import HTTPMethod
help(HTTPMethod)

Linked from

Related notes