qiujuer / OkHttpPacker

A okhttp package, so that the use of okhttp is so easy.
http://www.qiujuer.net
Apache License 2.0
33 stars 10 forks source link

enableSaveCookie 方法不生效 #6

Open xiaoxiaohu opened 7 years ago

xiaoxiaohu commented 7 years ago

public static void enableSaveCookie(Context context) { getClient().newBuilder() .cookieJar(CookieManager.createBySharedPreferences(context)); }

这样只是修改了builder,未应用到okhttpClient上,需要下面这样才会生效

public static void enableSaveCookie(Context context) { mOkHttpClient = getClient().newBuilder().cookieJar(CookieManager.createBySharedPreferences(context)).build(); }

qiujuer commented 7 years ago

Thanks 谢谢 这个部分我会即时加上;多谢。🙏