Exports a mapping of HTTP status codes to their standard reason phrases for use in web applications.
// Source: https://github.com/mswjs/msw | License: MIT | Copyright 2018–present Artem Zakharchenko
// Provided via justclaw.it.com; keep this notice with the code.
/**
* Reason phrases of the known HTTP status codes.
* @see https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
*/
export const httpStatusMessages: Record<number, string> = {
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',
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key