Error HttpClient cannot be resolved to a type
29,796
You've imported versions 4.3+ of the libraries but are trying to use the old HTTP commons classes (version 3?), ie GetMethod
.
The HttpClient
is in package org.apache.http.client
. The new version of GetMethod
is HttpGet
.
It's all here.
Author by
Mubashir Ali
An Experienced Enterprise Application Engineer with expertise on a range of tools and technologies under the umbrella of J2EE.
Updated on November 03, 2020Comments
-
Mubashir Ali over 3 years
I am trying to use http request and response method but i am getting error that
The import org.apache.commons cannot be resolved
i have included
httpcore.jar, httpclient.jar, httpmime.jar
but yet i am getting error.