I have imported httpclient
jar files, but this command cannot be resolved in eclipse or in selenium. But when click in error, it shows option to import but it doesn't work.
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();