
wee0.net.HttpStatus Maven / Gradle / Ivy
The newest version!
/**
* Copyright (c) 2016-2022, wee0.com.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
package wee0.net;
/**
* HTTP常用状态码
* @author baihw
* @date 2018年7月2日
**/
/**
* * examples:
*
**/
public final class HttpStatus{
private HttpStatus(){
}
/**
* 200响应代码:成功响应
*/
public static final int CODE_OK = 200;
/**
* 301响应代码:请求的资源永久迁移到新的位置
*/
public static final int CODE_PERMANENTLY_MOVED = 301;
/**
* 302响应代码:请求的资源暂时需要从另一个地址响应,后续的请求中应该继续使用原地址
*/
public static final int CODE_TEMPORARILY_MOVED = 302;
/**
* 401响应代码:客户端请求语法错误
*/
public static final int CODE_INVALID_REQUEST = 400;
/**
* 401响应代码:没有通过认证,或者没有认证信息。
*/
public static final int CODE_NOT_AUTHORIZED = 401;
/**
* 403响应代码:禁止访问。服务器理解请求,但由于没有权限,服务器拒绝提供资源。
*/
public static final int CODE_FORBIDDEN_ACCESS = 403;
/**
* 404响应代码:资源找不到
*/
public static final int CODE_NOT_FOUND = 404;
/**
* 480响应代码:自定义错误
*/
public static final int CODE_CUSTOM_ERROR = 480;
/**
* 500响应代码
*/
public static final int CODE_INTERNAL_ERROR = 500;
} // end class