Coder Social home page Coder Social logo

methods's Introduction

Methods

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

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

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ 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

methods's People

Contributors

blakeembrey avatar carpasse avatar dougwilson avatar evanhahn avatar forbeslindesay avatar jonathanong avatar kapouer avatar nook-scheel avatar thefourtheye avatar tj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

methods's Issues

License clarification

Hi, any chance you could add a clear license on this? The only thing I can spot is "MIT"
in the json packaging file...

Cheers!

missing PURGE method

PURGE is missing from the list. This method has been supported since node v0.8.0.

Also an unrelated little nitpick, 'SEARCH' should be moved to be between 'PROPPATCH' and 'UNLOCK' to match the order in http_parser.h.

Browserify compilation

It'd be nice if requiring this with Browserify didn't incur 5000 lines of extra dependencies (E.g. http, which in turn requires buffer, etc.) for people who are trying to keep builds smaller. It's as simple as adding this to the package.json:

  "browser": {
    "http": false
  }

The only reason this is an issue over a PR, however, is that returning the browserified http module methods could be seen as a feature - so I leave this in the eye of the beholder. Either way, I've copied the list out manually now to avoid the extra debt.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.