delvedor/find-my-way

httpMethods is a snapshot from Node 18.12.0 meaning methods from newer versions are unsupported

Closed this issue · 2 comments

Why this has been done rather than using http.METHODS?

Here is the explanation: #312.

A PR to update the list would be awesome.

Happy to do so. Would it make sense to have the constant value be a fallback if http.METHODS doesn't exist?

i.e.

const httpMethods = http.METHODS ?? [
  'ACL', 'BIND', 'CHECKOUT', 'CONNECT', 'COPY', 'DELETE',
  'GET', 'HEAD', 'LINK', 'LOCK', 'M-SEARCH', 'MERGE',
  'MKACTIVITY', 'MKCALENDAR', 'MKCOL', 'MOVE', 'NOTIFY', 'OPTIONS',
  'PATCH', 'POST', 'PROPFIND', 'PROPPATCH', 'PURGE', 'PUT',
  'REBIND', 'REPORT', 'SEARCH', 'SOURCE', 'SUBSCRIBE', 'TRACE',
  'UNBIND', 'UNLINK', 'UNLOCK', 'UNSUBSCRIBE'
]