Class CompletableCallback

java.lang.Object
net.dreamlu.mica.http.CompletableCallback
All Implemented Interfaces:
okhttp3.Callback

public class CompletableCallback extends Object implements okhttp3.Callback
采用 CompletableFuture 简化异步使用
Author:
L.cm
  • Constructor Details

  • Method Details

    • onFailure

      public void onFailure(okhttp3.Call call, IOException e)
      Specified by:
      onFailure in interface okhttp3.Callback
    • onResponse

      public void onResponse(okhttp3.Call call, okhttp3.Response response) throws IOException
      Specified by:
      onResponse in interface okhttp3.Callback
      Throws:
      IOException