isRequestMethod()function

isRequestMethod(method: string): method is RequestMethod
ParamType
methodstring
The method string to test. required
Return
method is RequestMethod
true if method is a supported RequestMethod, narrowing its type.

Is a string a supported HTTP request method?

Examples

isRequestMethod("GET") // true