MCPcopy
hub / github.com/JakeChampion/fetch / normalizeMethod

Function normalizeMethod

fetch.js:345–348  ·  view source on GitHub ↗
(method)

Source from the content-addressed store, hash-verified

343var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE']
344
345function normalizeMethod(method) {
346 var upcased = method.toUpperCase()
347 return methods.indexOf(upcased) > -1 ? upcased : method
348}
349
350export function Request(input, options) {
351 if (!(this instanceof Request)) {

Callers 1

RequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…