How to retry Retrofit call on HTTP errors (401) when using RxJava?
问题 My current Android Application is employing Retrofit(2.4.0) and RxJava(2.1.16) to execute my Web Service calls. Im using Google SignIn for my User Authentication. I want my Retrofit calls to detect HTTP 401 (UNAUTHORIZED) and attempt to Silently Login with Google Signin then retry the Retrofit call. My retrofit calls resemble this @Headers(HEADER_ACCEPT_JSON) @GET("resources") Observable<Response<String>> getResources(@Header(HEADER_AUTHORIZATION) @NonNull final String authenticationToken,