Skip to content

Commit

Permalink
调用超时时间设置10s
Browse files Browse the repository at this point in the history
  • Loading branch information
xueli.xue committed May 4, 2017
1 parent 09aad11 commit efba147
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ public static byte[] postRequest(String reqURL, byte[] date) throws Exception {
}*/

// timeout
RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(10000).setConnectTimeout(10000).build();
RequestConfig requestConfig = RequestConfig.custom()
.setConnectionRequestTimeout(10000)
.setSocketTimeout(10000)
.setConnectTimeout(10000)
.build();

httpPost.setConfig(requestConfig);

// data
Expand Down

0 comments on commit efba147

Please sign in to comment.