-
-
Save quevon24/e4ebed276d192fa4c2b2943f0a3a777a to your computer and use it in GitHub Desktop.
Handle Cookies easily with Retrofit/OkHttp
This file contains 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