9(第1页)
publichttputils(intconntimeout){
httpparamsparams=newbasichttpparams;
conn);
httpconne(para);
httpconneeout(para);
connmasperroute(paraperroutebean(10));
conns(params,10);
httpconne(params,true);
httpconneize(params,1024*8);
httppro(params,_1_1);
schemeregistryschemeregistry=newschemeregistry;
sch(newscheinso,80));
sch(newscheme("https",defaultsslso,443));
httpclient=newdefaulthttpclient(newthreadsafeclientconnmanager(params,schemeregistry),params);
tryhandler(newretryhandler(default_retry_times));
eptor(newhttprequestinterceptor{
rride
publicvoidprocess(.equest,httpcontexthttpcontext),ioexception{
if(!(header_accept_encoding)){
(header_accept_encoding,encoding_gzip);
}
});
ceptor(newhttpresponseinterceptor{
rride
publicvoidprocess(httpresponseresponse,httpcontexthttpcontext),ioexception{
finalhttpentityentity=;
if(entity==null){
return;
finalheaderencoding=ng;
if(encoding!=null){
for(headerele:){
if(("gzip")){
(newgzipdepressingentity);
return;
}
}
});
}
一秒记住新域名 m.biqunai.cc
请勿开启浏览器阅读模式,否则将导致章节内容缺失及无法阅读下一章。