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,
|
2019-07-07 11:18:12 +05:30
|
|
|
UNAUTHORIZED: 401,
|
2019-02-15 15:39:39 +05:30
|
|
|
FORBIDDEN: 403,
|
2018-11-08 19:23:39 +05:30
|
|
|
NOT_FOUND: 404,
|
2019-12-04 20:38:33 +05:30
|
|
|
GONE: 410,
|
2019-02-15 15:39:39 +05:30
|
|
|
UNPROCESSABLE_ENTITY: 422,
|
2020-01-01 13:55:28 +05:30
|
|
|
SERVICE_UNAVAILABLE: 503,
|
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;
|