java爬虫.HttpClient.请求参数
HttpClient.请求参数 有时候因为网络,或者目标服务器的原因,请求需要更长的时间才能完成,我们需要自定义相关时间 package cn . csdn . crawlar . test ; import org . apache . http . client . config . RequestConfig ; import org . apache . http . client . methods . CloseableHttpResponse ; import org . apache . http . client . methods . HttpGet ; import org . apache . http . impl . client . CloseableHttpClient ; import org . apache . http . impl . client . HttpClients ; import org . apache . http . util . EntityUtils ; import java . io . IOException ; public class HttpConfigTest { public static void main ( String [ ] args ) { //创建HttpClient对象