Commit 9f1f7fef by 许雪里 Committed by GitHub

Merge pull request #306 from it-noob/patch-1

修改http请求工具类入参拼写错误
parents 295fb256 34533c16
......@@ -26,7 +26,7 @@ public class HttpClientUtil {
/**
* post request
*/
public static byte[] postRequest(String reqURL, byte[] date) throws Exception {
public static byte[] postRequest(String reqURL, byte[] data) throws Exception {
byte[] responseBytes = null;
HttpPost httpPost = new HttpPost(reqURL);
......@@ -53,8 +53,8 @@ public class HttpClientUtil {
httpPost.setConfig(requestConfig);
// data
if (date != null) {
httpPost.setEntity(new ByteArrayEntity(date, ContentType.DEFAULT_BINARY));
if (data != null) {
httpPost.setEntity(new ByteArrayEntity(data, ContentType.DEFAULT_BINARY));
}
// do post
HttpResponse response = httpClient.execute(httpPost);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment