I am trying call an API by using loopj
library.Because I want to totally avoid org.apache.http.legacy
method for calling API.
So I add the dependency for the loopj
and build the project
compile 'com.loopj.android:android-async-http:1.4.9'
loopj
is successfully build, but when i try to call Header
for the AsyncHttpResponseHandler
org.apache.http.Header[] headers
is automatically import instead of cz.msebera.android.httpclient.Header
AsyncHttpClient clientloop = new AsyncHttpClient();
clientloop.get("http://www.google.com",new AsyncHttpResponseHandler() {
@Override
public void onSuccess(int i, org.apache.http.Header[] headers, byte[] bytes) {
}
@Override
public void onFailure(int i, org.apache.http.Header[] headers, byte[] bytes, Throwable throwable) {
}
});
can anyone please help me to avoid the calling of org.apache.http