码迷,mamicode.com
首页 > Web开发 > 详细

HttpStatus各种状态

时间:2017-04-14 00:18:09      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:media   service   time   modified   html   cat   attribute   value   nav   

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

HttpStatus各种状态

标签:media   service   time   modified   html   cat   attribute   value   nav   

原文地址:http://www.cnblogs.com/linjiaxin/p/6706829.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!