Skip to content
Myr

methods.js

This file

Path

lib/router/methods.js

70 lines · 1.4 KiB · JavaScript

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than fda31b7 point at it.

Added simple web-service exampleTj Holowaychukbefore adoptionfda31b7

lines 1–70why, one step back
1
2/*!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 */1213var RFC2616 = ['OPTIONS', 'GET', 'POST', 'PUT', 'DELETE', 'TRACE', 'CONNECT'];1415/**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 });