Update HttpRequest.java
This commit is contained in:
parent
a8189ca171
commit
2b10f2a01a
@ -99,7 +99,7 @@ public class HttpRequest {
|
||||
method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false));
|
||||
int status = client.executeMethod(method);
|
||||
if (status != HttpStatus.SC_OK) {
|
||||
throw new WeixinException(status, getCause(method.getStatusCode()));
|
||||
throw new WeixinException(status, "request fail");
|
||||
}
|
||||
// HttpClient对于要求接受后继服务的请求,象POST和PUT等不能自动处理转发
|
||||
// 301或者302
|
||||
@ -126,8 +126,4 @@ public class HttpRequest {
|
||||
method.releaseConnection();
|
||||
}
|
||||
}
|
||||
|
||||
private String getCause(int statusCode) {
|
||||
return "error---------------" + statusCode;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user