修改http请求工具类入参拼写错误

pull/MERGE
大水牛 7 years ago committed by GitHub
parent 295fb256c7
commit 34533c16b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,7 +26,7 @@ public class HttpClientUtil {
/** /**
* post request * 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; byte[] responseBytes = null;
HttpPost httpPost = new HttpPost(reqURL); HttpPost httpPost = new HttpPost(reqURL);
@ -53,8 +53,8 @@ public class HttpClientUtil {
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
// data // data
if (date != null) { if (data != null) {
httpPost.setEntity(new ByteArrayEntity(date, ContentType.DEFAULT_BINARY)); httpPost.setEntity(new ByteArrayEntity(data, ContentType.DEFAULT_BINARY));
} }
// do post // do post
HttpResponse response = httpClient.execute(httpPost); HttpResponse response = httpClient.execute(httpPost);

Loading…
Cancel
Save