chengkaiqiang e6b2cb2e99 DYZBC_20250121 1 month ago
..
HISTORY.md e6b2cb2e99 DYZBC_20250121 1 month ago
LICENSE e6b2cb2e99 DYZBC_20250121 1 month ago
README.md e6b2cb2e99 DYZBC_20250121 1 month ago
index.js e6b2cb2e99 DYZBC_20250121 1 month ago
package.json e6b2cb2e99 DYZBC_20250121 1 month ago

README.md

Methods

NPM Version NPM Downloads Node.js Version Build Status Test Coverage

HTTP verbs that Node.js core's HTTP parser supports.

This module provides an export that is just like http.METHODS from Node.js core, with the following differences:

  • All method names are lower-cased.
  • Contains a fallback list of methods for Node.js versions that do not have a http.METHODS export (0.10 and lower).
  • Provides the fallback list when using tools like browserify without pulling in the http shim module.

Install

$ npm install methods

API

var methods = require('methods')

methods

This is an array of lower-cased method names that Node.js supports. If Node.js provides the http.METHODS export, then this is the same array lower-cased, otherwise it is a snapshot of the verbs from Node.js 0.10.

License

MIT