http-status-codes
http-status-codes copied to clipboard
Constants enumerating the HTTP status codes. All status codes defined in RFC1945 (HTTP/1.0, RFC2616 (HTTP/1.1), and RFC2518 (WebDAV) are supported.
I added to the utility functions an optional fallback function parameter so throwing an error can be avoided, anyway we will be maintaining the error throw as a default behaviour...
MDN: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/425 HTTPWG: https://httpwg.org/specs/rfc8470.html#status
`302` was defined as `Moved Temporarily` in the HTTP/1.0 spec, but changed to `Found` in HTTP/1.1. Is it possible to update the name here, but keep `StatusCodes.MOVED_TEMPORARILY` as an alias...