HttpMethod

An HTTP request method: an RFC 9110 token, compared case-sensitively.

Stable Core. The seven constants in the companion cover the common methods; of returns them for their exact names and a new instance for any other token. Equality is on name; toString() is the name.

Parameters

name

the method token.

Types

Link copied to clipboard
object Companion

The common methods and the factory.

Properties

Link copied to clipboard

The method token, for example GET.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Two HttpMethods are equal when their names are equal.

Link copied to clipboard
open override fun hashCode(): Int

Returns a hash code consistent with equals: it is computed from the same properties.

Link copied to clipboard
open override fun toString(): String

Returns the method token name.