HttpClient发送GET和POST请求,传参需要用到StringEntity,NameValuePair,这两个类需要导入httpcore.jar。可以直接maven下载:
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.9</version>
</dependency>
HttpClient发送GET和POST请求所需的org.apache.http包
最新推荐文章于 2022-03-01 10:50:55 发布