ecology_maven/aiyh/utils/httpUtil/util/GlobalCache.java

43 lines
796 B
Java

package aiyh.utils.httpUtil.util;
import java.util.HashMap;
import java.util.Map;
/**
* @author EBU7-dev1-ayh
* @since 2021/08/30 17:56
*/
public class GlobalCache {
/**
* 全局请求头
*/
public Map<String,String> header = new HashMap<>();
/**
* 依赖参数容器
*/
public Map<String,Object> paramMap = new HashMap<>();
public Map<String,String> uptHeader(String key, String value){
header.put(key,value);
return header;
}
public Map<String,Object> uptParam(String key, Object value){
paramMap.put(key,value);
return paramMap;
}
public void clearHeader(){
header.clear();
}
public void clearParam(){
paramMap.clear();
}
}