package com.yd.ifm.client.caller.util.http; public class HttpEnum { public enum DefContentTypeEnum implements ContentTypeEnum{ F("application/x-www-form-urlencoded"), J("application/json"), X("application/xml"); private String type; private DefContentTypeEnum(String contentType){ this.type = contentType; } public String getType(){ return type; } } public interface ContentTypeEnum{ String getType(); } public enum RequestMethodEnum{ POST("POST"); private String method; private RequestMethodEnum(String method){ this.method = method; } public String getMethod(){ return method; } } }
ContentTypeEnum contentType = DefContentTypeEnum.valueOf(
"application/x-www-form-urlencoded"
);