methods.js
This file
Path
lib/router/methods.js
70 lines · 1.4 KiB · JavaScript
Last changed by
generated helper test methods from express.methodsTj Holowaychukbefore adoption4106bae
History of this fileTake it
The walk stopped after 200 commits: lines older than cd88b92 point at it.
Removed `app.dynamicLocals()`. Closes #756Tj Holowaychukbefore adoptioncd88b92
lines 1–12why, one step back12/*!3 * Express - router - methods4 * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>5 * MIT Licensed6 */78/**9 * Hypertext Transfer Protocol -- HTTP/1.1 10 * http://www.ietf.org/rfc/rfc2616.txt11 */12generated helper test methods from express.methodsTj Holowaychukbefore adoption4106bae
line 13why, one step back13var RFC2616 = ['OPTIONS', 'GET', 'POST', 'PUT', 'HEAD', 'DELETE', 'TRACE', 'CONNECT'];Removed `app.dynamicLocals()`. Closes #756Tj Holowaychukbefore adoptioncd88b92
lines 14–70why, one step back1415/**16 * HTTP Extensions for Distributed Authoring -- WEBDAV17 * http://www.ietf.org/rfc/rfc2518.txt18 */1920var RFC2518 = ['PROPFIND', 'PROPPATCH', 'MKCOL', 'COPY', 'MOVE', 'LOCK', 'UNLOCK'];2122/**23 * Versioning Extensions to WebDAV 24 * http://www.ietf.org/rfc/rfc3253.txt25 */2627var RFC3253 = ['VERSION-CONTROL', 'REPORT', 'CHECKOUT', 'CHECKIN', 'UNCHECKOUT', 'MKWORKSPACE', 'UPDATE', 'LABEL', 'MERGE', 'BASELINE-CONTROL', 'MKACTIVITY'];2829/**30 * Ordered Collections Protocol (WebDAV) 31 * http://www.ietf.org/rfc/rfc3648.txt32 */3334var RFC3648 = ['ORDERPATCH'];3536/**37 * Web Distributed Authoring and Versioning (WebDAV) Access Control Protocol 38 * http://www.ietf.org/rfc/rfc3744.txt39 */4041var RFC3744 = ['ACL'];4243/**44 * Web Distributed Authoring and Versioning (WebDAV) SEARCH45 * http://www.ietf.org/rfc/rfc5323.txt46 */4748var RFC5323 = ['SEARCH'];4950/**51 * PATCH Method for HTTP 52 * http://www.ietf.org/rfc/rfc5789.txt53 */5455var RFC5789 = ['PATCH'];5657/**58 * Expose the methods.59 */6061module.exports = [].concat(62 RFC261663 , RFC251864 , RFC325365 , RFC364866 , RFC374467 , RFC532368 , RFC5789).map(function(method){69 return method.toLowerCase();70 });