Http module

method_name

procedure · 1 overloadSource

The spelling of method on the wire, such as "GET". .OTHER has no spelling of its own and gives ""; use Head.method_text for the token a request actually carried. The string is a constant. The client refuses to send .OTHER (.INVALID_METHOD).

ExampleOpen in playground ↗
assert(method_name(.GET) == "GET");
assert(method_name(.OTHER) == "");
method_name :: (method: Method) -> string

The spelling of method on the wire, such as "GET". .OTHER has no spelling of its own and gives ""; use Head.method_text for the token a request actually carried. The string is a constant. The client refuses to send .OTHER (.INVALID_METHOD).

Parameters

method: Method

Returns

string
ExampleOpen in playground ↗
assert(method_name(.GET) == "GET");
assert(method_name(.OTHER) == "");

See also