constants.js 624 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. Copyright 2018 Google LLC
  3. Use of this source code is governed by an MIT-style
  4. license that can be found in the LICENSE file or at
  5. https://opensource.org/licenses/MIT.
  6. */
  7. import '../_version.js';
  8. /**
  9. * The default HTTP method, 'GET', used when there's no specific method
  10. * configured for a route.
  11. *
  12. * @type {string}
  13. *
  14. * @private
  15. */
  16. export const defaultMethod = 'GET';
  17. /**
  18. * The list of valid HTTP methods associated with requests that could be routed.
  19. *
  20. * @type {Array<string>}
  21. *
  22. * @private
  23. */
  24. export const validMethods = [
  25. 'DELETE',
  26. 'GET',
  27. 'HEAD',
  28. 'PATCH',
  29. 'POST',
  30. 'PUT',
  31. ];