拼接url参数

if("get".equalsIgnoreCase(method)){
    Enumeration params = request.getParameterNames();
    LinkedHashSet queryParam = new LinkedHashSet<>();
    while(params.hasMoreElements()){
        String key = param.nextElement();
        if(StringUtils.isNotBlank(key)){
            queryParam.add(URLEncoder.encode(key,"UTF-8")+"="+URLEncoder.encode(request.getParameter(key),"UTF-8"))
        }
    }
    url = request.getRequestURI()+"?"+request.getQueryString();
}
1.响应头移除
CloseableHttpResponse proxyRes
res.removeHeaders("Server");
res.removeHeaders("Connection");
res.removeHeaders("Set-Cookie");
res.removeHeaders("Transfer-Encoding");

2.请求头移除
cookie,host,connection

 

你可能感兴趣的:(拼接url参数)