Android - loopJ AsyncHttpClient return response onFinish or onSuccess

前端 未结 2 785
小蘑菇
小蘑菇 2020-12-15 14:34

I am looking for a way to return the response I get in loopJ AsyncHttpClient onFinish or onSuccess or onFailure. As of now I have this piece of code:

**jsonP         


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-15 15:38

    Use retrofit. It manages the http request very good and converts the json objects automatically to your Java objects. There is also a failure and success Callback. You can also decide whether the request is async or sync.

提交回复
热议问题