Http module

Method

enumSource

The request methods the codec knows. A token that is not one of them is .OTHER and its spelling stays in Head.method_text. parse_method turns text into a Method and method_name turns it back.

ExampleOpen in playground ↗
assert(parse_method("PATCH") == .PATCH);
assert(parse_method("get") == .OTHER); // method names are case-sensitive
assert(method_name(.DELETE) == "DELETE");

Members

OTHER
any other token: the spelling is in Head.method_text
GET
HEAD
POST
PUT
DELETE
CONNECT
OPTIONS
TRACE
PATCH

See also