UNPKG

readable-http-codes

Version:

0 dependency readable HTTP code enums, cleaning up your codebase!

131 lines (130 loc) 4.36 kB
export var statusTextMap = { 100: 'Continue', 101: 'Switching Protocols', 102: 'Processing', 103: 'Early Hints', 200: 'OK', 201: 'Created', 202: 'Accepted', 203: 'Non-Authoritative Information', 204: 'No Content', 205: 'Reset Content', 206: 'Partial Content', 207: 'Multi-Status', 208: 'Already Reported', 226: 'IM Used', 300: 'Multiple Choices', 301: 'Moved Permanently', 302: 'Found', 303: 'See Other', 304: 'Not Modified', 305: 'Use Proxy', 306: 'Switch Proxy', 307: 'Temporary Redirect', 308: 'Permanent Redirect', 400: 'Bad Request', 401: 'Unauthorized', 402: 'Payment Required', 403: 'Forbidden', 404: 'Not Found', 405: 'Method Not Allowed', 406: 'Not Acceptable', 407: 'Proxy Authentication Required', 408: 'Request Timeout', 409: 'Conflict', 410: 'Gone', 411: 'Length Required', 412: 'Precondition Failed', 413: 'Payload Too Large', 414: 'URI Too Long', 415: 'Unsupported Media Type', 416: 'Range Not Satisfiable', 417: 'Expectation Failed', 418: "I'm a teapot", 421: 'Misdirected Request', 422: 'Unprocessable Entity', 423: 'Locked', 424: 'Failed Dependency', 425: 'Unordered Collection', 426: 'Upgrade Required', 428: 'Precondition Required', 429: 'Too Many Requests', 431: 'Request Header Fields Too Large', 451: 'Unavailable For Legal Reasons', 500: 'Internal Server Error', 501: 'Not Implemented', 502: 'Bad Gateway', 503: 'Service Unavailable', 504: 'Gateway Timeout', 505: 'HTTP Version Not Supported', 506: 'Variant Also Negotiates', 507: 'Insufficient Storage', 508: 'Loop Detected', 510: 'Not Extended', 511: 'Network Authentication Required' }; export var statusTextMapWithPrefix = { 100: 'INFO: Continue', 101: 'INFO: Switching Protocols', 102: 'INFO: Processing', 103: 'INFO: Early Hints', 200: 'OK: OK', 201: 'OK: Created', 202: 'OK: Accepted', 203: 'OK: Non-Authoritative Information', 204: 'OK: No Content', 205: 'OK: Reset Content', 206: 'OK: Partial Content', 207: 'OK: Multi-Status', 208: 'OK: Already Reported', 226: 'OK: IM Used', 300: 'REDIRECT: Multiple Choices', 301: 'REDIRECT: Moved Permanently', 302: 'REDIRECT: Found', 303: 'REDIRECT: See Other', 304: 'REDIRECT: Not Modified', 305: 'REDIRECT: Use Proxy', 306: 'REDIRECT: Switch Proxy', 307: 'REDIRECT: Temporary Redirect', 308: 'REDIRECT: Permanent Redirect', 400: 'CLIENT ERROR: Bad Request', 401: 'CLIENT ERROR: Unauthorized', 402: 'CLIENT ERROR: Payment Required', 403: 'CLIENT ERROR: Forbidden', 404: 'CLIENT ERROR: Not Found', 405: 'CLIENT ERROR: Method Not Allowed', 406: 'CLIENT ERROR: Not Acceptable', 407: 'CLIENT ERROR: Proxy Authentication Required', 408: 'CLIENT ERROR: Request Timeout', 409: 'CLIENT ERROR: Conflict', 410: 'CLIENT ERROR: Gone', 411: 'CLIENT ERROR: Length Required', 412: 'CLIENT ERROR: Precondition Failed', 413: 'CLIENT ERROR: Payload Too Large', 414: 'CLIENT ERROR: URI Too Long', 415: 'CLIENT ERROR: Unsupported Media Type', 416: 'CLIENT ERROR: Range Not Satisfiable', 417: 'CLIENT ERROR: Expectation Failed', 418: "CLIENT ERROR: I'm a teapot", 421: 'CLIENT ERROR: Misdirected Request', 422: 'CLIENT ERROR: Unprocessable Entity', 423: 'CLIENT ERROR: Locked', 424: 'CLIENT ERROR: Failed Dependency', 425: 'CLIENT ERROR: Unordered Collection', 426: 'CLIENT ERROR: Upgrade Required', 428: 'CLIENT ERROR: Precondition Required', 429: 'CLIENT ERROR: Too Many Requests', 431: 'CLIENT ERROR: Request Header Fields Too Large', 451: 'CLIENT ERROR: Unavailable For Legal Reasons', 500: 'SERVER ERROR: Internal Server Error', 501: 'SERVER ERROR: Not Implemented', 502: 'SERVER ERROR: Bad Gateway', 503: 'SERVER ERROR: Service Unavailable', 504: 'SERVER ERROR: Gateway Timeout', 505: 'SERVER ERROR: HTTP Version Not Supported', 506: 'SERVER ERROR: Variant Also Negotiates', 507: 'SERVER ERROR: Insufficient Storage', 508: 'SERVER ERROR: Loop Detected', 510: 'SERVER ERROR: Not Extended', 511: 'SERVER ERROR: Network Authentication Required' };