Docs@skmtc/core

Operations

FUNCTION

toMethodVerb

@skmtc/core 0.63.4

Converts HTTP method to a descriptive verb.

Signature

import { toMethodVerb } from '@skmtc/core'

toMethodVerb(method: Method): string

Parameters

method, Method required

HTTP method

Example
console.log(toMethodVerb('post')); // 'Create'
console.log(toMethodVerb('put'));  // 'Update'
console.log(toMethodVerb('get'));  // 'get'
console.log(toMethodVerb('delete')); // 'delete'
console.log(toMethodVerb('query')); // 'Query'

Returns

string

Descriptive verb for the method