この OkHttpStack は、OkHttp2.0 ではサポートされなくなりました: https://gist.github.com/JakeWharton/5616899
OkHttp 2.0.0 を Volley と統合する現在のパターンは何ですか?
この OkHttpStack は、OkHttp2.0 ではサポートされなくなりました: https://gist.github.com/JakeWharton/5616899
OkHttp 2.0.0 を Volley と統合する現在のパターンは何ですか?
これも使えます
import com.android.volley.toolbox.HurlStack;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.OkUrlFactory;
/**
* An {@link com.android.volley.toolbox.HttpStack HttpStack} implementation
* which uses OkHttp as its transport.
*/
public class OkHttpStack extends HurlStack {
private final OkUrlFactory mFactory;
public OkHttpStack() {
this(new OkHttpClient());
}
public OkHttpStack(OkHttpClient client) {
if (client == null) {
throw new NullPointerException("Client must not be null.");
}
mFactory = new OkUrlFactory(client);
}
}