Taxum / @taxum/core / http / Method
Class: Method
Defined in: http/method.ts:9
Represents an HTTP method.
This class defines standard HTTP methods as static readonly properties and provides functionality to create new method instances from strings.
Properties
value
readonly
value:string
Defined in: http/method.ts:20
CONNECT
readonly
static
CONNECT:Method
Defined in: http/method.ts:10
DELETE
readonly
static
DELETE:Method
Defined in: http/method.ts:11
GET
readonly
static
GET:Method
Defined in: http/method.ts:12
HEAD
readonly
static
HEAD:Method
Defined in: http/method.ts:13
OPTIONS
readonly
static
OPTIONS:Method
Defined in: http/method.ts:14
PATCH
readonly
static
PATCH:Method
Defined in: http/method.ts:15
POST
readonly
static
POST:Method
Defined in: http/method.ts:16
PUT
readonly
static
PUT:Method
Defined in: http/method.ts:17
TRACE
readonly
static
TRACE:Method
Defined in: http/method.ts:18
Methods
equals()
equals(
other
):boolean
Defined in: http/method.ts:29
Compares the current method with another method to determine equality.
Parameters
other
string
| Method
Returns
boolean
toJSON()
toJSON():
string
Defined in: http/method.ts:64
Returns
string
fromString()
static
fromString(method
):Method
Defined in: http/method.ts:39
Converts a string representation of an HTTP method to its corresponding Method
enum or creates a new Method
object if no match is found.
Note that method string representations are case-sensitive!
Parameters
method
string
Returns
Method