Unverified 提交 34533c16 authored 作者: 大水牛's avatar 大水牛 提交者: GitHub

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

上级 295fb256
......@@ -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 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论