Reputation: 121
I'm trying to get cookie from server response (from Headers).
I built library from source : https://github.com/loopj/android-async-http and add it to my project. Here i try to override metod
client.post(context, link, requestEntity, contentType, new AsyncHttpResponseHandler() { @Override public void onSuccess(int statusCode, Header[] headers, String content) { Log.d("headers", String.valueOf(headers)); onSuccess(statusCode, content); } });
but get error :
The method onSuccess(int, PreferenceActivity.Header[], String) of type new AsyncHttpResponseHandler(){} must override or implement a supertype method
How I can override this metod or get Headers?
Upvotes: 1
Views: 1033
Reputation: 241
I have ever faced with this problem. Try to open your gradle (Gradle Scripts), edit your build.gradle(Module:app) by adding:
dependencies {
compile 'com.loopj.android:android-async-http:1.4.9'
}
after your gradle running, try import cz.msebera.android.httpclient.Header;
I hope it will help you :)
Upvotes: 0
Reputation: 668
Headers type supposed to be org.apache.http.Header[] instead of Header[]
Upvotes: 0