Reputation: 559
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.
Upvotes: 8
Views: 38519
Reputation: 7744
If anyone else stumbles upon this, check this
As mentioned by @sotirios, its been replaced by HttpGet. I set this to get it working
import org.apache.http.client.methods.HttpGet;
Upvotes: 0
Reputation: 417
You can download jar file from below link and import in your project
Upvotes: -1
Reputation: 279960
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.
Upvotes: 7