|
|
@@ -56,7 +56,7 @@ public class HttpClientUtil {
|
|
|
|
|
|
PostMethod httpPost = new PostMethod(url);
|
|
|
try {
|
|
|
- RequestEntity requestEntity = new ByteArrayRequestEntity(params.getBytes("utf-8"));
|
|
|
+ ByteArrayRequestEntity requestEntity = new ByteArrayRequestEntity(params.getBytes("utf-8"));
|
|
|
httpPost.setRequestEntity(requestEntity);
|
|
|
if (StringUtils.hasText(type)) {
|
|
|
httpPost.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
|
|
@@ -126,7 +126,7 @@ public class HttpClientUtil {
|
|
|
httpput.setRequestHeader("Authorization", "Bearer " + token);
|
|
|
try {
|
|
|
if (param != null) {
|
|
|
- RequestEntity entity = new StringRequestEntity(param, "application/json", "UTF-8");
|
|
|
+ StringRequestEntity entity = new StringRequestEntity(param, "application/json", "UTF-8");
|
|
|
httpput.setRequestEntity(entity);
|
|
|
}
|
|
|
client.executeMethod(httpput);
|