Http客户端无法在selenium中解析

时间:2018-03-12 09:13:33

标签: eclipse selenium classpath apache-commons-httpclient eclipse-classpath

我已导入httpclient jar文件,但此命令无法在eclipse或selenium中解析。但是当点击错误时,它会显示导入选项,但它不起作用。

final HttpParams httpParams = new BasicHttpParams(); 
HttpConnectionParams.setConnectionTimeout(httpParams, 30000); 
HttpConnectionParams.setSoTimeout(httpParams, 30000); 
HttpClient client = new DefaultHttpClient(); 
HttpPost post = new HttpPost(url); 
post.setHeader("Content-Type", "application/json"); 
post.setEntity(new StringEntity(input, HTTP.UTF_8)); 
HttpResponse response = client.execute(post); 
client.getConnectionManager().closeExpiredConnections();

0 个答案:

没有答案