debian-mirror-gitlab/app/assets/javascripts/lib/utils/http_status.js

36 lines
739 B
JavaScript
Raw Normal View History

2017-08-17 22:00:37 +05:30
/**
* exports HTTP status codes
*/
2018-11-18 11:00:15 +05:30
const httpStatusCodes = {
2017-09-10 17:25:29 +05:30
ABORTED: 0,
2017-08-17 22:00:37 +05:30
OK: 200,
2018-11-18 11:00:15 +05:30
CREATED: 201,
ACCEPTED: 202,
NON_AUTHORITATIVE_INFORMATION: 203,
NO_CONTENT: 204,
RESET_CONTENT: 205,
PARTIAL_CONTENT: 206,
MULTI_STATUS: 207,
ALREADY_REPORTED: 208,
IM_USED: 226,
2018-03-17 18:26:18 +05:30
MULTIPLE_CHOICES: 300,
BAD_REQUEST: 400,
2018-11-08 19:23:39 +05:30
NOT_FOUND: 404,
2017-08-17 22:00:37 +05:30
};
2018-11-18 11:00:15 +05:30
export const successCodes = [
httpStatusCodes.OK,
httpStatusCodes.CREATED,
httpStatusCodes.ACCEPTED,
httpStatusCodes.NON_AUTHORITATIVE_INFORMATION,
httpStatusCodes.NO_CONTENT,
httpStatusCodes.RESET_CONTENT,
httpStatusCodes.PARTIAL_CONTENT,
httpStatusCodes.MULTI_STATUS,
httpStatusCodes.ALREADY_REPORTED,
httpStatusCodes.IM_USED,
];
export default httpStatusCodes;