Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

HTTP Methods supported by http_parser.c should be exposed #6422

Closed
kapouer opened this issue Oct 27, 2013 · 3 comments
Closed

HTTP Methods supported by http_parser.c should be exposed #6422

kapouer opened this issue Oct 27, 2013 · 3 comments

Comments

@kapouer
Copy link

kapouer commented Oct 27, 2013

It feels weird to have the list of supported methods not available within node.
I know it is available at https://github.com/visionmedia/node-methods,
yet it is out of sync (the SEARCH method is missing) and would be
cheap to expose in the http module.

@jonathanong
Copy link

+1 http.METHODS would be nice

@kapouer
Copy link
Author

kapouer commented Oct 27, 2013

The API should also take #3192 into account.

@Rudolf-Meyer
Copy link

Simple example how to show supported methods:
C:\Usr> npm install methods
methods@1.1.2 node_modules\methods

C:\Usr> notepad http-methods.js

C:\Usr> type http-methods.js
var methods = require('methods');
console.log('Supported HTTP Methods: %O', methods);

C:\Usr> node http-methods
Supported HTTP Methods: %O [ 'checkout',
'connect',
'copy',
'delete',
'get',
'head',
'lock',
'm-search',
'merge',
'mkactivity',
'mkcalendar',
'mkcol',
'move',
'notify',
'options',
'patch',
'post',
'propfind',
'proppatch',
'purge',
'put',
'report',
'search',
'subscribe',
'trace',
'unlock',
'unsubscribe' ]

C:\Usr>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants