====== retrofit ====== * https://square.github.io/retrofit/ * https://github.com/kwon37xi/research-retrofit-2 : 동기식 처리 기법 * [[java:okhttp|OkHTTP]] 기반 * [[springframework:feign|Fegin]]과 유사하게 HTTP Request 자동화. java/android 지원. ===== 비동기 지원 (async) ===== * [[https://github.com/JakeWharton/retrofit2-reactor-adapter|JakeWharton/retrofit2-reactor-adapter: A Project Reactor CallAdapter.Factory implementation for Retrofit 2.]] [[reactive_programming:reactor|Project Reactor]] * [[reactive_programming:rxjava|RxJava]] * [[java:8:completable_future|Java 8 CompletableFuture]] - ''retrofit2.CompletableFutureCallAdapterFactory'' ===== Async / non-blocking IO 지원 ===== * [[java:asynchttpclient|AsyncHttpClient]] 로 non-blocking IO 지원 가능. * [[https://github.com/AnkBurov/retrofit-http-client-adapter|AnkBurov/retrofit-http-client-adapter: An adapter between Retrofit and asynchronous non-blocking Java 11 Http Client]] : [[java:httpclient|Java 11 HttpClient]] 구현체로 non-blocking IO 하기 ===== 참조 ===== * [[https://futurestud.io/tutorials/retrofit-2-simple-error-handling|Retrofit 2 — Simple Error Handling]] * [[https://futurestud.io/tutorials/retrofit-2-how-to-detect-network-and-conversion-errors-in-onfailure|Retrofit 2 — How to Detect Network and Conversion Errors in onFailure]] * [[https://stackoverflow.com/questions/24562716/how-to-retry-http-requests-with-okhttp-retrofit/31733634|How to retry HTTP requests with OkHttp/Retrofit?]] * [[https://stackoverflow.com/questions/32579754/retrying-the-request-using-retrofit-2|java - Retrying the request using Retrofit 2 - Stack Overflow]] * [[https://tosslab.github.io/android/2016/04/16/migration-to-retrofit2.html|Retrofit2 로 전환 | JANDI Tech]] * [[https://jungwoon.github.io/android/2019/07/11/Retrofit/|Retrofit2 정리하기 - Jungwoon Blog]]