All Downloads are FREE. Search and download functionalities are using the official Maven repository.

wee0.net.HttpMethod 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月1日
 **/

/**
 * 
 *  examples:
 * 
**/ public enum HttpMethod{ /** * 首部响应。向服务器索要与GET请求相一致的响应,只不过响应体将不会被返回。 这一方法可以在不必传输整个响应内容的情况下,就可以获取包含在响应消息头中的元信息。 */ HEAD( "HEAD" ), /** * 查询,向特定的资源发出请求。注意:GET方法不应当被用于产生“副作用”的操作中。 */ GET( "GET" ), /** * 提交,不要求幂等性。向指定资源提交数据进行处理请求(例如提交表单或者上传文件)。数据被包含在请求体中。POST请求可能会导致新的资源的建立和/或已有资源的修改。 */ POST( "POST" ), /** * 更新,要求幂等性。向指定资源位置上传新内容。 */ PUT( "PUT" ), /** * 删除。请求服务器删除URI所标识的资源。 */ DELETE( "DELETE" ), /** * 返回服务器针对特定资源所支持的HTTP请求方法 */ OPTIONS( "OPTIONS" ), /** * 回显服务器收到的请求,主要用于测试或诊断。 */ TRACE( "TRACE" ), /** * HTTP/1.1协议中预留给能够将连接改为管道方式的代理服务器。 */ CONNECT( "CONNECT" ); /** * 当前类型对应的method值。 */ private final String _METHOD; /** * 设置当前类型对应的method值。 * * @param method 当前类型对应的method值。 */ HttpMethod( String method ){ this._METHOD = method; } /** * @return 当前类型对应的method值。 */ public String value(){ return this._METHOD; } } // end class




© 2015 - 2025 Weber Informatics LLC | Privacy Policy