Socket
Socket
Sign inDemoInstall

methods

Package Overview
Dependencies
0
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    methods

HTTP methods that node supports


Version published
Weekly downloads
29M
decreased by-1.6%
Maintainers
4
Install size
6.18 kB
Created
Weekly downloads
 

Package description

What is methods?

The 'methods' npm package provides a list of HTTP methods that are supported by the Node.js core, which can be useful for handling and parsing HTTP requests in web applications. It is often used in conjunction with other packages like Express to ensure consistency in method names and provide utility functions for working with HTTP methods.

What are methods's main functionalities?

List of HTTP methods

This feature provides an array of lower-cased HTTP method names that are supported by the Node.js core. It can be used to iterate over or validate HTTP methods in web applications.

const methods = require('methods');
console.log(methods); // outputs an array of HTTP methods

Other packages similar to methods

Readme

Source

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

Keywords

FAQs

Last updated on 18 Jan 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc