Retrofit + RxJava (+RxAndroid) ã§ä»¥ä¸ã®ãããªã¡ãã£ã¨è¤éãªã¦ã¼ã¹ã±ã¼ã¹ã¯ã©ãæ¸ãã°ããã®ããªã¨èª¿ã¹ã¦ã¿ãã defer 㨠onErrorResumeNext ã使ãã°ããããããªãããã¨ãã話 (ãã ãRetrofitã¯é¢ä¿ãªã話ã«ãªã£ã)ã åè: retrofit with rxjava handling network exceptions globally ã¦ã¼ã¹ã±ã¼ã¹ ã¦ã¼ã¶æ å ±ãåå¾ããAPIãå©ãï¼èªè¨¼ãå¿ è¦ãªAPIï¼ 401ãè¿ã£ã¦ããããã¢ã¯ã»ã¹ãã¼ã¯ã³ãå度åå¾ããå¦çãè¡ã ã¢ã¯ã»ã¹ãã¼ã¯ã³ã®ååå¾ã«æåããå ´åã¯ãæ°ããã¢ã¯ã»ã¹ãã¼ã¯ã³ã使ã£ã¦ããã¨ã®ãªã¯ã¨ã¹ãï¼ã¦ã¼ã¶æ å ±ã®åå¾ï¼ããã1åè¡ã ã¢ã¯ã»ã¹ãã¼ã¯ã³ã®ååå¾ã«å¤±æããå ´åã¯ããã°ã¤ã³ç»é¢ã«é£ã°ã å®è£ private void getUser() { Observabl
{{#tags}}- {{label}}
{{/tags}}