Comments (3)
Cool, I'll get them added :) but it's unlikely to fix your issue, as by default the array we export comes from Node.js core, so running this module on Node.js still won't pick up any new methods I add here.
from methods.
In other words, if the following command does not list the methods you need, you need to file this issue with Node.js:
node -pe "require('http').METHODS"
from methods.
Looks like there is nothing for us to do, because require('http').METHODS
doesn't include those two methods, even in the latest version of io.js; you'll notice in our source, all we do is return a lower-cased version of this array:
module.exports = http.METHODS.map(function(method){
return method.toLowerCase();
});
I verified the latest version of io.js does not include those methods, so there is nothing we can do:
$ iojs -pe 'require("http").METHODS'
[ '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' ]
$ iojs -v
v2.4.0
The reason why we're not going to just add it is two-fold:
- This module currently only exists to provide a shim for
require('http').METHODS
in browser environments, thus at most, our list will be the same as the latest version of Node.js/io.js. - The http server within Node.js/io.js will only allow methods through that appear in their
METHODS
array, so simply getting that method added to the browser-only array in this module won't help you use those methods in koa anyway.
from methods.
Related Issues (11)
- move to expressjs org?
- Browserify compilation HOT 4
- Make useful; pull from IANA
- Document when http.METHODS suffices HOT 4
- Add support for WebDAV verb SEARCH HOT 1
- Increase node version floor and cut new major once QUERY is supported? HOT 2
- please tag the repository and push tag HOT 2
- consider using new http.METHODS API HOT 3
- License clarification HOT 2
- missing PURGE method HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from methods.