Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*!
  2. * methods
  3. * Copyright(c) 2013-2014 TJ Holowaychuk
  4. * Copyright(c) 2015-2016 Douglas Christopher Wilson
  5. * MIT Licensed
  6. */
  7. 'use strict';
  8. /**
  9. * Module dependencies.
  10. * @private
  11. */
  12. var http = require('http');
  13. /**
  14. * Module exports.
  15. * @public
  16. */
  17. module.exports = getCurrentNodeMethods() || getBasicNodeMethods();
  18. /**
  19. * Get the current Node.js methods.
  20. * @private
  21. */
  22. function getCurrentNodeMethods() {
  23. return http.METHODS && http.METHODS.map(function lowerCaseMethod(method) {
  24. return method.toLowerCase();
  25. });
  26. }
  27. /**
  28. * Get the "basic" Node.js methods, a snapshot from Node.js 0.10.
  29. * @private
  30. */
  31. function getBasicNodeMethods() {
  32. return [
  33. 'get',
  34. 'post',
  35. 'put',
  36. 'head',
  37. 'delete',
  38. 'options',
  39. 'trace',
  40. 'copy',
  41. 'lock',
  42. 'mkcol',
  43. 'move',
  44. 'purge',
  45. 'propfind',
  46. 'proppatch',
  47. 'unlock',
  48. 'report',
  49. 'mkactivity',
  50. 'checkout',
  51. 'merge',
  52. 'm-search',
  53. 'notify',
  54. 'subscribe',
  55. 'unsubscribe',
  56. 'patch',
  57. 'search',
  58. 'connect'
  59. ];
  60. }