-
-
Save azzahrah/a80092899eee5e713cb88ff5d9323e3d to your computer and use it in GitHub Desktop.
Handle Cookies easily with Retrofit/OkHttp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Somewhere you create a new OkHttpClient and use it on all your requests. | |
*/ | |
OkHttpClient okHttpClient = new OkHttpClient(); | |
okHttpClient.interceptors().add(new AddCookiesInterceptor()); | |
okHttpClient.interceptors().add(new ReceivedCookiesInterceptor()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment