HttpStatus各种状态

来源:互联网 发布:淘宝刷票会被发现吗 编辑:程序博客网 时间:2024/05/21 19:42
  1. /**  
  2.  *   
  3.  * @author jinghai.xiao@gmail.com  
  4.  * @version 0.0.1  
  5.  * depands : JS.js, Observable.js  
  6.  */  
  7. JS.ns("JS.HTTPStatus","JS.XMLHttpRequest");  
  8.  /**  
  9.   * FC 2616 HTTP1.1规范的HTTP Status状态常量  
  10.   * http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10  
  11.   */  
  12.   
  13. JS.HTTPStatus = {  
  14.         //Informational 1xx  
  15.         '100' : 'Continue',  
  16.         '101' : 'Switching Protocols',  
  17.         //Successful 2xx  
  18.         '200' : 'OK',  
  19.         '201' : 'Created',  
  20.         '202' : 'Accepted',  
  21.         '203' : 'Non-Authoritative Information',  
  22.         '204' : 'No Content',  
  23.         '205' : 'Reset Content',  
  24.         '206' : 'Partial Content',  
  25.         //Redirection 3xx  
  26.         '300' : 'Multiple Choices',  
  27.         '301' : 'Moved Permanently',  
  28.         '302' : 'Found',  
  29.         '303' : 'See Other',  
  30.         '304' : 'Not Modified',  
  31.         '305' : 'Use Proxy',  
  32.         '306' : 'Unused',  
  33.         '307' : 'Temporary Redirect',  
  34.         //Client Error 4xx  
  35.         '400' : 'Bad Request',  
  36.         '401' : 'Unauthorized',  
  37.         '402' : 'Payment Required',  
  38.         '403' : 'Forbidden',  
  39.         '404' : 'Not Found',  
  40.         '405' : 'Method Not Allowed',  
  41.         '406' : 'Not Acceptable',  
  42.         '407' : 'Proxy Authentication Required',  
  43.         '408' : 'Request Timeout',  
  44.         '409' : 'Conflict',  
  45.         '410' : 'Gone',  
  46.         '411' : 'Length Required',  
  47.         '412' : 'Precondition Failed',  
  48.         '413' : 'Request Entity Too Large',  
  49.         '414' : 'Request-URI Too Long',  
  50.         '415' : 'Unsupported Media Type',  
  51.         '416' : 'Requested Range Not Satisfiable',  
  52.         '417' : 'Expectation Failed',  
  53.         //Server Error 5xx  
  54.         '500' : 'Internal Server Error',  
  55.         '501' : 'Not Implemented',  
  56.         '502' : 'Bad Gateway',  
  57.         '503' : 'Service Unavailable',  
  58.         '504' : 'Gateway Timeout',  
  59.         '505' : 'HTTP Version Not Supported'  
  60. };  
  61. JS.HTTPStatus.OK = 200;  
  62. JS.HTTPStatus.BADREQUEST = 400;  
  63. JS.HTTPStatus.FORBIDDEN = 403;  
  64. JS.HTTPStatus.NOTFOUND = 404;  
  65. JS.HTTPStatus.TIMEOUT = 408;  
  66. JS.HTTPStatus.SERVERERROR = 500
0 0
原创粉丝点击