All files / ima/http StatusCode.js

100% Statements 3/3
100% Branches 0/0
100% Functions 0/0
100% Lines 3/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74    4x                   4x                                                                                                                       4x  
import ns from '../namespace';
 
ns.namespace('ima.http');
 
/**
 * HTTP status code constants, representing the HTTP status codes recognized
 * and processed by this proxy.
 *
 * @enum {number}
 * @const
 * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
 */
const StatusCode = Object.freeze({
  /**
	 * OK
	 *
	 * @type {number}
	 */
  OK: 200,
 
  /**
	 * No content
	 *
	 * @type {number}
	 */
  NO_CONTENT: 203,
 
  /**
	 * Bad request
	 *
	 * @type {number}
	 */
  BAD_REQUEST: 400,
 
  /**
	 * Unauthorized
	 *
	 * @type {number}
	 */
  UNAUTHORIZED: 401,
 
  /**
	 * Forbidden
	 *
	 * @type {number}
	 */
  FORBIDDEN: 403,
 
  /**
	 * Not found
	 *
	 * @type {number}
	 */
  NOT_FOUND: 404,
 
  /**
	 * Request timeout
	 *
	 * @type {number}
	 */
  TIMEOUT: 408,
 
  /**
	 * Internal Server Error
	 *
	 * @type {number}
	 */
  SERVER_ERROR: 500
});
 
export default StatusCode;
 
ns.ima.http.StatusCode = StatusCode;