File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
src/main/java/com/arronlong/httpclientutil Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 4
4
5
5
## Maven坐标:
6
6
```
7
+ <!-- https://mvnrepository.com/artifact/com.arronlong/httpclientutil -->
7
8
<dependency>
8
- <groupId>com.arronlong</groupId>
9
- <artifactId>httpclientutil</artifactId>
10
- <version>1.0.1</version>
9
+ <groupId>com.arronlong</groupId>
10
+ <artifactId>httpclientutil</artifactId>
11
+ <version>1.0.1</version>
11
12
</dependency>
12
13
```
13
14
Original file line number Diff line number Diff line change 3
3
<modelVersion >4.0.0</modelVersion >
4
4
<groupId >com.arronlong</groupId >
5
5
<artifactId >httpclientutil</artifactId >
6
- <version >1.0.1 </version >
6
+ <version >1.0.2-SNAPSHOT </version >
7
7
<name >${project.artifactId} </name >
8
8
<description >基于HttpClient-4.4.1封装的工具类。支持插件式配置Header、插件式配置httpclient对象,这样就可以方便地自定义header信息、配置ssl、配置proxy、Cookie等</description >
9
9
Original file line number Diff line number Diff line change @@ -397,8 +397,11 @@ private static HttpResponse execute(HttpConfig config) throws HttpProcessExcepti
397
397
if (HttpEntityEnclosingRequestBase .class .isAssignableFrom (request .getClass ())){
398
398
List <NameValuePair > nvps = new ArrayList <NameValuePair >();
399
399
400
- //检测url中是否存在参数
401
- config .url (Utils .checkHasParas (config .url (), nvps , config .inenc ()));
400
+ if (request .getClass ()==HttpGet .class ) {
401
+ //检测url中是否存在参数
402
+ //注:只有get请求,才自动截取url中的参数,post等其他方式,不再截取
403
+ config .url (Utils .checkHasParas (config .url (), nvps , config .inenc ()));
404
+ }
402
405
403
406
//装填参数
404
407
HttpEntity entity = Utils .map2HttpEntity (nvps , config .map (), config .inenc ());
You can’t perform that action at this time.
0 commit comments