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

com.gitee.apanlh.web.content.GetContentStrategy Maven / Gradle / Ivy

There is a newer version: 2.0.0.2
Show newest version
package com.gitee.apanlh.web.content;

import com.gitee.apanlh.util.base.StringUtils;
import com.gitee.apanlh.web.http.HttpContentType;
import com.gitee.apanlh.web.http.HttpMethod;
import com.gitee.apanlh.web.util.ServletUtils;

/**	
 * 	GET请求类型
 * 
 * 	@author Pan
 */
class GetContentStrategy implements RequestContentStrategy {

	@Override
	public HttpContentType getContent() {
		return HttpContentType.GET;
	}

	@Override
	public String getContentStr() {
		return HttpContentType.GET.getType();
	}

	@Override
	public String getContentStr(String contentType) {
		//	验证是否为GET类型
		if (StringUtils.compare(ServletUtils.getMethod(), HttpMethod.GET) || contentType == null) {
			return getContentStr();
		}
		return null;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy