Missing dependency for HttpClient

I am using HttpClient in a working Java application. I added httpclient-4.0.1.jar and httpmime-4.0.1.jar to the build path, but I get the error message "Type org.apache.http.HttpResponse cannot be resolved. This indirectly refers to the required .class files. Who Does anyone know what dependency / jar I am missing?

+6
source share
4 answers

You may be missing the httpcore jar.

+20
source

This class is part of the HttpCore library, here the link shows that it uses:

http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/class-use/HttpResponse.html

You need to include the jar in your path to the / lib classes.

+3
source

I think you will also need:

httpcore-4.xxjar 
+2
source

Source: https://habr.com/ru/post/890483/


All Articles