HttpClient【一】

之前见过这东西确不知道是干嘛的,后来学习了下才发现,原来它就相当于一个游览器客户端能够发出get和post请求,然后获得返回的数据。
首先新建一个java项目,然后添加所需jar包。
commons-logging-1.1.3.jar,httpclient-4.5.3.jar,httpcore-4.4.6.jar
然后就是代码的编写了,也比较简单。
package cn.sp.test01;

import java.util.ArrayList;
import java.util.List;

import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.junit.Test;

public class HttpClient {
	public static void testGet() throws Exception{
//		第一步:把HttpClient使用的jar包添加到工程中。
//		第二步:创建一个HttpClient的测试类
//		第三步:创建测试方法。
//		第四步:创建一个HttpClient对象
		CloseableHttpClient httpClient = HttpClients.createDefault();
//		第五步:创建一个HttpGet对象,需要制定一个请求的url
		HttpGet get=new HttpGet("http://www.baidu.com");
//		第六步:执行请求。
		CloseableHttpResponse response=httpClient.execute(get);
//		第七步:接收返回结果。HttpEntity对象。
		HttpEntity entity=response.getEntity();
//		第八步:取响应的内容。
		String html=EntityUtils.toString(entity);
		System.out.println(html);
//		第九步:关闭response、HttpClient
		response.close();
		httpClient.close();
	}
	
	public void test01(){
		System.out.println("23232");
	}
	
	public void testPost() throws Exception{
//		第一步:创建一个httpClient对象
		CloseableHttpClient httpClient = HttpClients.createDefault();
//		第二步:创建一个HttpPost对象。需要指定一个url
		HttpPost post=new HttpPost("http://www.baidu.com");
//		第三步:创建一个list模拟表单,list中每个元素是一个NameValuePair对象
		List<NameValuePair> formList=new ArrayList<NameValuePair>();
		formList.add(new BasicNameValuePair("name","张三"));
		formList.add(new BasicNameValuePair("pass","1234"));
		
//		第四步:需要把表单包装到Entity对象中。StringEntity
		StringEntity entity=new UrlEncodedFormEntity(formList,"utf-8");
		post.setEntity(entity);
//		第五步:执行请求。
		CloseableHttpResponse response = httpClient.execute(post);
//		第六步:接收返回结果
		HttpEntity httpEntity=response.getEntity();
		String result = EntityUtils.toString(httpEntity);
		System.out.println(result);
//		第七步:关闭流。
		response.close();
		httpClient.close();
	}
	public static void main(String[] args) throws Exception {
		testGet();
	}
}
运行结果如下:
2017-03-17 22:26:24,633 DEBUG org.apache.http.client.protocol.RequestAddCookies.process() - CookieSpec selected: default
2017-03-17 22:26:24,645 DEBUG org.apache.http.client.protocol.RequestAuthCache.process() - Auth cache not set in the context
2017-03-17 22:26:24,646 DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager.requestConnection() - Connection request: [route: {}->http://www.baidu.com:80][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
2017-03-17 22:26:24,661 DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection() - Connection leased: [id: 0][route: {}->http://www.baidu.com:80][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
2017-03-17 22:26:24,663 DEBUG org.apache.http.impl.execchain.MainClientExec.execute() - Opening connection {}->http://www.baidu.com:80
2017-03-17 22:26:24,684 DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect() - Connecting to www.baidu.com/163.177.151.110:80
2017-03-17 22:26:24,714 DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect() - Connection established 36.36.13.14:10160<->163.177.151.110:80
2017-03-17 22:26:24,714 DEBUG org.apache.http.impl.execchain.MainClientExec.execute() - Executing request GET / HTTP/1.1
2017-03-17 22:26:24,714 DEBUG org.apache.http.impl.execchain.MainClientExec.execute() - Target auth state: UNCHALLENGED
2017-03-17 22:26:24,715 DEBUG org.apache.http.impl.execchain.MainClientExec.execute() - Proxy auth state: UNCHALLENGED
2017-03-17 22:26:24,717 DEBUG org.apache.http.headers.onRequestSubmitted() - http-outgoing-0 >> GET / HTTP/1.1
2017-03-17 22:26:24,717 DEBUG org.apache.http.headers.onRequestSubmitted() - http-outgoing-0 >> Host: www.baidu.com
2017-03-17 22:26:24,717 DEBUG org.apache.http.headers.onRequestSubmitted() - http-outgoing-0 >> Connection: Keep-Alive
2017-03-17 22:26:24,717 DEBUG org.apache.http.headers.onRequestSubmitted() - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.7.0_67)
2017-03-17 22:26:24,718 DEBUG org.apache.http.headers.onRequestSubmitted() - http-outgoing-0 >> Accept-Encoding: gzip,deflate
2017-03-17 22:26:24,718 DEBUG org.apache.http.wire.wire() - http-outgoing-0 >> "GET / HTTP/1.1[\r][\n]"
2017-03-17 22:26:24,718 DEBUG org.apache.http.wire.wire() - http-outgoing-0 >> "Host: www.baidu.com[\r][\n]"
2017-03-17 22:26:24,718 DEBUG org.apache.http.wire.wire() - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2017-03-17 22:26:24,719 DEBUG org.apache.http.wire.wire() - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5.3 (Java/1.7.0_67)[\r][\n]"
2017-03-17 22:26:24,719 DEBUG org.apache.http.wire.wire() - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
2017-03-17 22:26:24,719 DEBUG org.apache.http.wire.wire() - http-outgoing-0 >> "[\r][\n]"
2017-03-17 22:26:24,736 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2017-03-17 22:26:24,736 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "Server: bfe/1.0.8.18[\r][\n]"
2017-03-17 22:26:24,737 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "Date: Fri, 17 Mar 2017 14:26:22 GMT[\r][\n]"
2017-03-17 22:26:24,737 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "Content-Type: text/html[\r][\n]"
2017-03-17 22:26:24,737 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "Last-Modified: Mon, 23 Jan 2017 13:27:41 GMT[\r][\n]"
2017-03-17 22:26:24,737 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2017-03-17 22:26:24,737 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "Connection: Keep-Alive[\r][\n]"
2017-03-17 22:26:24,738 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform[\r][\n]"
2017-03-17 22:26:24,738 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "Pragma: no-cache[\r][\n]"
2017-03-17 22:26:24,738 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "Set-Cookie: BDORZ=27315; max-age=86400; domain=.baidu.com; path=/[\r][\n]"
2017-03-17 22:26:24,738 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "Content-Encoding: gzip[\r][\n]"
2017-03-17 22:26:24,738 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "[\r][\n]"
2017-03-17 22:26:24,741 DEBUG org.apache.http.headers.onResponseReceived() - http-outgoing-0 << HTTP/1.1 200 OK
2017-03-17 22:26:24,741 DEBUG org.apache.http.headers.onResponseReceived() - http-outgoing-0 << Server: bfe/1.0.8.18
2017-03-17 22:26:24,741 DEBUG org.apache.http.headers.onResponseReceived() - http-outgoing-0 << Date: Fri, 17 Mar 2017 14:26:22 GMT
2017-03-17 22:26:24,741 DEBUG org.apache.http.headers.onResponseReceived() - http-outgoing-0 << Content-Type: text/html
2017-03-17 22:26:24,742 DEBUG org.apache.http.headers.onResponseReceived() - http-outgoing-0 << Last-Modified: Mon, 23 Jan 2017 13:27:41 GMT
2017-03-17 22:26:24,742 DEBUG org.apache.http.headers.onResponseReceived() - http-outgoing-0 << Transfer-Encoding: chunked
2017-03-17 22:26:24,742 DEBUG org.apache.http.headers.onResponseReceived() - http-outgoing-0 << Connection: Keep-Alive
2017-03-17 22:26:24,742 DEBUG org.apache.http.headers.onResponseReceived() - http-outgoing-0 << Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
2017-03-17 22:26:24,742 DEBUG org.apache.http.headers.onResponseReceived() - http-outgoing-0 << Pragma: no-cache
2017-03-17 22:26:24,742 DEBUG org.apache.http.headers.onResponseReceived() - http-outgoing-0 << Set-Cookie: BDORZ=27315; max-age=86400; domain=.baidu.com; path=/
2017-03-17 22:26:24,742 DEBUG org.apache.http.headers.onResponseReceived() - http-outgoing-0 << Content-Encoding: gzip
2017-03-17 22:26:24,749 DEBUG org.apache.http.impl.execchain.MainClientExec.execute() - Connection can be kept alive indefinitely
2017-03-17 22:26:24,754 DEBUG org.apache.http.client.protocol.ResponseProcessCookies.processCookies() - Cookie accepted [BDORZ="27315", version:0, domain:baidu.com, path:/, expiry:null]
2017-03-17 22:26:24,757 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "476[\r][\n]"
2017-03-17 22:26:24,757 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "[0x1f][0x8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0x3][0x85]V[o[0xdc]D[0x14]~G[0xe2]?L[0x8d][0x92][0xb4][0x8a]v[0x9d][0xdd]U[0xd5][0x92][0xb5][0x1d][0x85]4H[0x11][0xf][0xad]h"[0xc1][0xd3]jl[0x8f][0xd7][0xd3][0xd8]3[0xc6]3^gyj[0xa4][0x16][0x81][0xa0][0x4]T.[0x82]"[0x81][0x10]4< 5[0x88]HT)i[0xff][0xcc]:[0x97]'[0xfe][0x2]g[0xec][0xd9][0xec]n[0xb2]QW+[0xd9]s[0xe6][0xcc]w[0xbe]s[0x1d][Wn[0xdd]^Y[0xff][0xf0][0xce]*[\n]"
2017-03-17 22:26:24,757 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "e[0x1c]9o[0xbe]a][0xa9][0xd5][0xee][0xae]/[0xaf]o[0xdc]E[0xb7][0xdf][0xab][0xd5][0x1c][0xab][0x94]#+$[0xd8]w[0xac][0x98]H[0xc][0x9a]2[0xa9][0x91][0x8f]2[0xda][0xb3]=[0xce]$a[0xb2]&[0xfb][0x9]AzaK[0xb2]%Mu[0xac][0xed][0x85]8[0x15]D[0xda][0x99][0xc]j7/[0x9e][0xfe][0xa0][0xb6][0xb1]\[[0xe1]q[0x82]%u[0xa3][0x11][0xc0][0xda][0xaa][0xbd][0xea]w[0x89]>0[0x84][0xc5]Q[0x8e][0xfb][0x2]1[0x1c][0x13];%[0x1]IS[0x92]:VD[0xd9]&JId[0xb][0xd9][0x8f][0x88][0x8][0x9][0x91]H[0xb1][0xa9]XxB[0xa0][0x10][0x94]m[0xc5]y[0xd1]4E[0xa3][0xee][0xfa]B[0x82]=[0xaf][0xee][0xf1][0xd8]L[0xcd]<[0xcf]M[0xf]{!1][0x9f][0xa7][0x1f][0x9b].[0xa6]~V[0x8f])[0xab][0xc3]Y[0xc7][0x92]TF[0xc4]9[0xfe][0xe1]eq[0xf0]t[0xf0][0xfc][0xfe][0xe0][0xf9][0xe7][0xff][0xfd][0xfb][0xc5][0xe0][0xf0][0x97]b[0xef][0xaf][0xe3][0x9f]?[0xdd]~l[0x99][0x95][0x8a]e[0x96][0x11]B[0x96][0xcb][0xfd]>R[0xac][0xec][0xb7][0x16][0xe0][0xe7]y[0xe][0xb2]|[0xda]C[0xd4][0xb7][0xf3][0x14]'[0x9][0x90]>[0x13][0xe8]#j[0xdb][0x8b][0xb0][0x10][0xb6][0x12]t&[0xd5][0xaa][\r][0xd1][0x9]x[0x1a][0xeb][0x93][0xe3][0xa2]s[0xda]`%[0xea][0x82][0x1a][0x8d][0xbb]([0xa4]>[0x9][0xb8][0x97][0x9][[0xa6][0x19]A"[0xf5]lS[0xf9][[0xaf]|T[0xfe][0x83][0x1a][0xf8][0xdd][0x89]x[0x97]7[0xea][0x9][0xeb][0xa2][0x9c][0xfa]2[0xb4][0x9b]7[0x16]PHh7[0x94]v[0xa3][0xf9]6[0xc0][0x99]@[0x11][0x1e][0x8a][0x83]r[0xa4]|[0x96][0x89][0x8][0x10][0xf6]$[0xe5][0xec][0x2][0xb2][0xd0][0x1e][0x5][0x8a]4eI[0xa6][0xd3][0x2][0xa4]|[0xc2][0xaa],[0x96][0x11][0xef][0x0][0xf][0x82]z8[0xca][0x88][0xdd][0xb8]\[0x97][0xe]u[0xaa]Z[0xba][0x14]3[0xd0]P7/[0x87]JE[0xaf][0xe3]&[0xaf]7[0xa9][0xf4][0xa8][0xbf][0xf5]zE[0xc9][0xb4]N[0x19]X[0xc7][0x12][0x9]f[0xda]}[0xc3][0xed]"[0xd1][0xa1][0x89][0x84]<[0x19][0x8e][0xe][0x4]Dp3[0xaf]B[0x90][0xfb]Z[0xb1]T[0xaa]`P[0x8c][0xb7]"[0xc2][0xba]*[0x11][0xd7][0xaf]#[0x9c]I[0xe]1J""[0x89][0xcd][0x3][0x88]8[0x8][0xca][0xbc]:[0x96][0xa9]LM1[0xe8]J6n[0xb0]l[0x8][0x91][0xb9]1[0x95]*}"[0xd3]|[0xc7][0xeb]z[0x82]0[0x9c][0x7][0xb6][0x15]:d_[0xd7][0x9e][0xae][0x2][0xfd][0xd0]E[0x9d][0xa9][0xa4][0xc1]P[0x18][0xeb]2Fr1*[0xb2][0xca]Qy[0xaf]#S[0xb5][0xa1][0xed][0xc4][0xc][0xf7][0x9c][0xa3][0xef][0xf6]N[0xbf]a[0x99][0xf8][0x2][0x84]*[0xd3][0x10][0xf3]F[0xb3][0xa5][0xfa]t[0xc][0xa2][0x12][0x8e][0x83]T[0x92]i 1N[0xa6][0xd2][0x0][0xf9]8@[0xf1][0xd3]^[0xf1][0xe4][0xe5]4[0x80][0xde][0xd4][0xe3]=[0xe8]+>[0xe]p[0xb2][0xfb][0xc9][0xe9][0xaf]_O[0x3][0x90][0x94][0xb8]x*H[0xb9]3[0x1][0xb2][0xbf]_|[0xb5][[0x81]0.[0xbc][0x14][0x8a]fjXF[0xdd][M,h^[0x98]V][0x1a],[0x95]o[0xb3]8N[0xda]2[0x89][0xec][0x98][0x95][0xaf]Y9[0xfb]fZ[0xcb]3[0xcd]w[0xe1]?[0xd1][0xff]3[0xcd]`[0xa6][0x15][0x8c][0xda]p[0xa6][0xe5]7[0xce]b][0xa2]i[0x86][0x91][0xb]3[0xf0]Eq[0xf8]m[0xc5][0xcf][0x1c]#[0xa8][0x99][0xfa]0hb[0xb8][\n]"
2017-03-17 22:26:24,758 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "[0xea]yJ%[0xb9]:7,[0x9]CO[0xde][0x9][0xbb]z[0xd6][0x9e]g[0xae]Yg[0xf6][0xdc]<"[0xcc][0xe3]>[0xd9]xm[0x5]J[0x9f]3@[0xbe][0x9a]S[0xe6][0xf3][0xbc][0x1e]q[0xf][0xe6]7guUr[0xf3][0xe8][0x82]X[0x10][0x9c]z![0xb2]m[0x1b][0x19][0x6]ZB[0xc6][0x92][0x81][0x16][0x91]1k\[0x9b]G[0xc6][0xc8]W[0xbb][0xa1][0x4]sF[0xe5][0xaf][0x1][0xf5]Y[0xd2]1[0xb4][0xc7]F[0xe4][0x1a]c>[0xcf]]kC;[0x9c]K[0xca][0xf9]i[0x1a][0xf3][0x94][0x98]g[0xf1]sSJ[0xe1][0xee][0xd2]x[0xb0]B[0xe5][0x15]e[0x1b]>[0x15]I[0x84][0xfb][0x8b][0xc8][0x5]W6[0xdb][0x86]s[0xf4]d[0xbf][0xf8][0xed][0xc7][0xc1][0xc1]n[0xf1]x[[0x7][0xb8][0x9a][0xb7]S[0x1b].[0x90]+[0x9c]Ae[0xe8][0xfe]+[0x97]9[0xac][0x13][0xd5][0xda]Qx[0xa1]fB[0x98][0xaf][0xa3][0x12]t[0x8a][0x87][0xf][0xe][0xbe][0xac]:Z[0xc9][0xd2]tLy[0xd9][0xe5]0[0xb8][0xdf]Qw[0xa2]&[0x96][0xc]-y[0x89]3[0xeb][0xf1][0xa4][0xdf]n.4n[0xcc]2W$[0xed]R[0xaf]z[0x1d][0xa6]j[0xf6][0xfd]L[0xf6]Mgp[0xf8][0xea][0xf8][0x9b]?*"[0xc5]g[0x8f][0x8a]W[0xf]O[0x9e][0x95][0xb3][0xa0]B8?T[0xee]Q[0xcc][0xfa]t[0xc4][0xcd][0xd4][0x81][0xf5][0x92]Z@[0x88][0xef]bo[0xd3]9z[0xb0]s[0xb2][0xbb]][0xec]<:}[0xfa][0xa9][0xe2][![\r][0xe][0xfe]\[[0xb9]s[0xf2]l{[0xa1][0x5]T[[0xc5][0xce]?C[0xb][0xea][0x96][0xbc][0xec]Z[0xec][\n]"
2017-03-17 22:26:24,758 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "[0xd5]S[0xe0][0xad][0xa9]\[0x9e][0xcc][0xc4]p[0xa5][0xee]z[0xb5][0xa9][0xbf][0x9d][0xfe][0x7]\[0x85]C[0x1]M[0x9][0x0][0x0][\r][\n]"
2017-03-17 22:26:24,758 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "0[\r][\n]"
2017-03-17 22:26:24,758 DEBUG org.apache.http.wire.wire() - http-outgoing-0 << "[\r][\n]"
2017-03-17 22:26:24,759 DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager.releaseConnection() - Connection [id: 0][route: {}->http://www.baidu.com:80] can be kept alive indefinitely
2017-03-17 22:26:24,759 DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager.releaseConnection() - Connection released: [id: 0][route: {}->http://www.baidu.com:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
<!DOCTYPE html>
<!--STATUS OK--><html> <head><meta http-equiv=content-type content=text/html;charset=utf-8><meta http-equiv=X-UA-Compatible content=IE=Edge><meta content=always name=referrer><link rel=stylesheet type=text/css href=http://s1.bdstatic.com/r/www/cache/bdorz/baidu.min.css><title>百度一下,你就知道</title></head> <body link=#0000cc> <div id=wrapper> <div id=head> <div class=head_wrapper> <div class=s_form> <div class=s_form_wrapper> <div id=lg> <img hidefocus=true src=//www.baidu.com/img/bd_logo1.png width=270 height=129> </div> <form id=form name=f action=//www.baidu.com/s class=fm> <input type=hidden name=bdorz_come value=1> <input type=hidden name=ie value=utf-8> <input type=hidden name=f value=8> <input type=hidden name=rsv_bp value=1> <input type=hidden name=rsv_idx value=1> <input type=hidden name=tn value=baidu><span class="bg s_ipt_wr"><input id=kw name=wd class=s_ipt value maxlength=255 autocomplete=off autofocus></span><span class="bg s_btn_wr"><input type=submit id=su value=百度一下 class="bg s_btn"></span> </form> </div> </div> <div id=u1> <a href=http://news.baidu.com name=tj_trnews class=mnav>新闻</a> <a href=http://www.hao123.com name=tj_trhao123 class=mnav>hao123</a> <a href=http://map.baidu.com name=tj_trmap class=mnav>地图</a> <a href=http://v.baidu.com name=tj_trvideo class=mnav>视频</a> <a href=http://tieba.baidu.com name=tj_trtieba class=mnav>贴吧</a> <noscript> <a href=http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u=http%3A%2F%2Fwww.baidu.com%2f%3fbdorz_come%3d1 name=tj_login class=lb>登录</a> </noscript> <script>document.write('<a href="http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u='+ encodeURIComponent(window.location.href+ (window.location.search === "" ? "?" : "&")+ "bdorz_come=1")+ '" name="tj_login" class="lb">登录</a>');</script> <a href=//www.baidu.com/more/ name=tj_briicon class=bri style="display: block;">更多产品</a> </div> </div> </div> <div id=ftCon> <div id=ftConw> <p id=lh> <a href=http://home.baidu.com>关于百度</a> <a href=http://ir.baidu.com>About Baidu</a> </p> <p id=cp>&copy;2017 Baidu <a href=http://www.baidu.com/duty/>使用百度前必读</a>  <a href=http://jianyi.baidu.com/ class=cp-feedback>意见反馈</a> äº¬ICP证030173号  <img src=//www.baidu.com/img/gs.gif> </p> </div> </div> </div> </body> </html>

2017-03-17 22:26:24,760 DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager.shutdown() - Connection manager is shutting down
2017-03-17 22:26:24,760 DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection.close() - http-outgoing-0: Close connection
2017-03-17 22:26:24,760 DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager.shutdown() - Connection manager shut down
下一期再写在项目中的运用。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值