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

top.jfunc.common.http.Method Maven / Gradle / Ivy

There is a newer version: 1.2.12
Show newest version
package top.jfunc.common.http;

/**
 * Http方法枚举
 * @author Looly
 * @author xiongshiyan
 */
public enum Method {
	/**
	 * HTTP相关方法
	 */
	GET {
        @Override
        public boolean hasContent() {
            return false;
        }
    }, POST {
        @Override
        public boolean hasContent() {
            return true;
        }
    }, HEAD {
        @Override
        public boolean hasContent() {
            return false;
        }
    }, OPTIONS {
        @Override
        public boolean hasContent() {
            return false;
        }
    }, PUT {
        @Override
        public boolean hasContent() {
            return true;
        }
    }, DELETE {
        @Override
        public boolean hasContent() {
            return false;
        }
    }, TRACE {
        @Override
        public boolean hasContent() {
            return false;
        }
    }, PATCH {
        @Override
        public boolean hasContent() {
            return true;
        }
    };

    /**
     * 需要写数据吗?
     */
    public abstract boolean hasContent();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy