Skip to content

Instantly share code, notes, and snippets.

@htunnicliff
Created March 11, 2022 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save htunnicliff/36f1187358875eda93cd463688e15b76 to your computer and use it in GitHub Desktop.
Save htunnicliff/36f1187358875eda93cd463688e15b76 to your computer and use it in GitHub Desktop.
type HttpStatus = {
// 2xx
200: 'Ok';
201: 'Created';
202: 'Accepted';
203: 'Non-Authoritative Information';
204: 'No Content';
205: 'Reset Content';
// 4xx
400: 'Bad Request';
401: 'Unauthorized';
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';
425: 'Too Early';
426: 'Upgrade Required';
428: 'Precondition Required';
429: 'Too Many Requests';
431: 'Request Header Fields Too Large';
451: 'Unavailable For Legal Reasons';
// 5xx
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';
510: 'Not Extended';
511: 'Network Authentication Required';
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment