Skip to main content

isHttpMethod()

function isHttpMethod(value): value is "OPTIONS" | "GET" | "HEAD" | "PUT" | "POST" | "DELETE" | "PATCH"

Type guard function, returns true if the given value is a valid HttpMethod

Parameters​

ParameterType
valueunknown

Returns​

value is "OPTIONS" | "GET" | "HEAD" | "PUT" | "POST" | "DELETE" | "PATCH"