httpMethods is a snapshot from Node 18.12.0 meaning methods from newer versions are unsupported
Closed this issue · 2 comments
andokai commented
Why this has been done rather than using http.METHODS
?
andokai commented
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'
]