[置顶] http 请求 response 417 解决方案

http 请求时,有时候会response417错误,只要new httpClient时设置属性即可解决:直接贴代码

  1. HttpClient httpClient = new DefaultHttpClient();
  2. HttpParams httpParams = httpClient.getParams();
  3. httpParams.setParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, false);

 

你可能感兴趣的:([置顶] http 请求 response 417 解决方案)