I can not import org.apache.http.conn
class into my application in Eclipse.
This is my class:
package br.com.cadastro.cadastrocompleto.suporte;
import java.io.IOException;
public class WebClient {
private String url;
public WebClient(String url){
this.url = url;
}
public void post(String json){
try {
HttpPost post = new HttpPost(url);
post.setEntity(new StringEntity(json));
post.setHeader("Accept", "application/json");
post.setHeader("Content-type", "application/json");
HttpClient httpClient = new HttpClient();
HttpResponse response = httpClient.execute(post);
String jsonDeResposta = EntityUtils.toString(response.getEntity());
}catch(IOException e){
e.printStackTrace();
}
}
}
What can I do about it?
EDIT
It looks like this in Eclipse: