-
-
Save jscorales/25b411f46241a3060a9588dbc1a89b7f 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