-
-
Save hastebrot/562a753a49a388822d1a998cccc3e650 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