HttpStatus狀態碼
HttpStatus = {
//Informational 1xx 信息
'100' : 'Continue', //繼續
'101' : 'Switching Protocols', //交換協議
//Successful 2xx 成功
'200' : 'OK', //OK
'201' : 'Created', //創建
'202' : 'Accepted', //已接受
'203' : 'Non-Authoritative Information', //非權威信息
'204' : 'No Content', //沒有內容
'205' : 'Reset Content', //重置內容
'206' : 'Partial Content', //部分內容
//Redirection 3xx 重定向
'300' : 'Multiple Choices', //多種選擇
'301' : 'Moved Permanently', //永久移動
'302' : 'Found', //找到
'303' : 'See Other', //參見其他
'304' : 'Not Modified', //未修改
'305' : 'Use Proxy', //使用代理
'306' : 'Unused', //未使用
'307' : 'Temporary Redirect', //暫時重定向
//Client Error 4xx 客戶端錯誤
'400' : 'Bad Request', //錯誤的請求
'401' : 'Unauthorized', //未經授權
'402' : 'Payment Required', //付費請求
'403' : 'Forbidden', //禁止
'404' : 'Not Found', //沒有找到
'405' : 'Method Not Allowed', //方法不允許
'406' : 'Not Acceptable', //不可接受
'407' : 'Proxy Authentication Required', //需要代理身份驗證
'408' : 'Request Timeout', //請求超時
'409' : 'Conflict', //指令衝突
'410' : 'Gone', //文檔永久地離開了指定的位置
'411' : 'Length Required', //需要Content-Length頭請求
'412' : 'Precondition Failed', //前提條件失敗
'413' : 'Request Entity Too Large', //請求實體太大
'414' : 'Request-URI Too Long', //請求URI太長
'415' : 'Unsupported Media Type', //不支持的媒體類型
'416' : 'Requested Range Not Satisfiable', //請求的範圍不可滿足
'417' : 'Expectation Failed', //期望失敗
//Server Error 5xx 服務器錯誤
'500' : 'Internal Server Error', //內部服務器錯誤
'501' : 'Not Implemented', //未實現
'502' : 'Bad Gateway', //錯誤的網關
'503' : 'Service Unavailable', //服務不可用
'504' : 'Gateway Timeout', //網關超時
'505' : 'HTTP Version Not Supported' //HTTP版本不支持
};
常用HttpStatus狀態碼
200\400\401\403\404\408\500