소스 검색

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

许雪里 8 년 전
부모
커밋
9f1f7fef41
No account linked to committer's email
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      xxl-job-core/src/main/java/com/xxl/job/core/util/HttpClientUtil.java

+ 3 - 3
xxl-job-core/src/main/java/com/xxl/job/core/util/HttpClientUtil.java 파일 보기

26
 	/**
26
 	/**
27
 	 * post request
27
 	 * post request
28
 	 */
28
 	 */
29
-	public static byte[] postRequest(String reqURL, byte[] date) throws Exception {
29
+	public static byte[] postRequest(String reqURL, byte[] data) throws Exception {
30
 		byte[] responseBytes = null;
30
 		byte[] responseBytes = null;
31
 		
31
 		
32
 		HttpPost httpPost = new HttpPost(reqURL);
32
 		HttpPost httpPost = new HttpPost(reqURL);
53
 			httpPost.setConfig(requestConfig);
53
 			httpPost.setConfig(requestConfig);
54
 
54
 
55
 			// data
55
 			// data
56
-			if (date != null) {
57
-				httpPost.setEntity(new ByteArrayEntity(date, ContentType.DEFAULT_BINARY));
56
+			if (data != null) {
57
+				httpPost.setEntity(new ByteArrayEntity(data, ContentType.DEFAULT_BINARY));
58
 			}
58
 			}
59
 			// do post
59
 			// do post
60
 			HttpResponse response = httpClient.execute(httpPost);
60
 			HttpResponse response = httpClient.execute(httpPost);