Skip to content

Commit 5d50d92

Browse files
committed
fix postForm
1 parent 155c10b commit 5d50d92

File tree

12 files changed

+30
-15
lines changed

12 files changed

+30
-15
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<groupId>com.codingapi.springboot</groupId>
1717
<artifactId>springboot-parent</artifactId>
18-
<version>2.10.19</version>
18+
<version>2.10.20</version>
1919

2020
<url>https://github.com/codingapi/springboot-framewrok</url>
2121
<name>springboot-parent</name>

springboot-starter-data-authorization/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>springboot-parent</artifactId>
88
<groupId>com.codingapi.springboot</groupId>
9-
<version>2.10.19</version>
9+
<version>2.10.20</version>
1010
</parent>
1111

1212
<name>springboot-starter-data-authorization</name>

springboot-starter-data-fast/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-parent</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>2.10.19</version>
8+
<version>2.10.20</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

springboot-starter-flow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>springboot-parent</artifactId>
88
<groupId>com.codingapi.springboot</groupId>
9-
<version>2.10.19</version>
9+
<version>2.10.20</version>
1010
</parent>
1111

1212
<name>springboot-starter-flow</name>

springboot-starter-security/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>springboot-parent</artifactId>
88
<groupId>com.codingapi.springboot</groupId>
9-
<version>2.10.19</version>
9+
<version>2.10.20</version>
1010
</parent>
1111

1212
<artifactId>springboot-starter-security</artifactId>

springboot-starter/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.codingapi.springboot</groupId>
77
<artifactId>springboot-parent</artifactId>
8-
<version>2.10.19</version>
8+
<version>2.10.20</version>
99
</parent>
1010
<artifactId>springboot-starter</artifactId>
1111

springboot-starter/src/main/java/com/codingapi/springboot/framework/rest/HttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public String post(String url, HttpHeaders headers, JSON jsonObject) {
3131
return httpRequest.getPostRequest(url, headers, jsonObject).execute();
3232
}
3333

34-
public String post(String url, HttpHeaders headers, MultiValueMap<String, String> formData) {
34+
public String post(String url, HttpHeaders headers, MultiValueMap<String, Object> formData) {
3535
return httpRequest.getPostRequest(url, headers, formData).execute();
3636
}
3737

springboot-starter/src/main/java/com/codingapi/springboot/framework/rest/HttpRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ public Request getPostRequest(String url, HttpHeaders headers, JSON jsonObject)
129129
};
130130
}
131131

132-
public Request getPostRequest(String url, HttpHeaders headers, MultiValueMap<String, String> formData) {
133-
HttpEntity<MultiValueMap<String, String>> httpEntity = new HttpEntity<>(formData, headers);
132+
public Request getPostRequest(String url, HttpHeaders headers, MultiValueMap<String, Object> formData) {
133+
HttpEntity<MultiValueMap<String, Object>> httpEntity = new HttpEntity<>(formData, headers);
134134
String requestUrl = requestHandler.handler(this,url ,HttpMethod.POST,headers,httpEntity);
135135
return () -> {
136136
ResponseEntity<String> httpResponse = restTemplate.exchange(requestUrl, HttpMethod.POST, httpEntity, String.class);

springboot-starter/src/main/java/com/codingapi/springboot/framework/rest/RestClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public String get(String api, HttpHeaders headers, MultiValueMap<String, String>
6262
}
6363

6464
public String get(String api, HttpHeaders headers, RestParam paramBuilder) {
65-
return get(api, headers,paramBuilder!=null?paramBuilder.toFormRequest():null);
65+
return get(api, headers,paramBuilder!=null?paramBuilder.toGetRequest():null);
6666
}
6767

6868
public String get(String api, RestParam paramBuilder) {

springboot-starter/src/main/java/com/codingapi/springboot/framework/rest/SessionClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ public String getHtml(String url){
9292

9393
public String getHtml(String url, RestParam restParam){
9494
httpHeaders.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
95-
return httpClient.get(url,httpHeaders,restParam!=null?restParam.toFormRequest():null);
95+
return httpClient.get(url,httpHeaders,restParam!=null?restParam.toGetRequest():null);
9696
}
9797

9898
public String getJson(String url, RestParam restParam){
9999
httpHeaders.setContentType(MediaType.APPLICATION_JSON);
100-
return httpClient.get(url,httpHeaders,restParam!=null?restParam.toFormRequest():null);
100+
return httpClient.get(url,httpHeaders,restParam!=null?restParam.toGetRequest():null);
101101
}
102102
}

0 commit comments

Comments
 (0)