Retrofit: How to wait for response

前端 未结 2 1718
故里飘歌
故里飘歌 2021-02-05 16:48

I have AsyncTask and the doInBackground method inside which, I sending POST request using Retrofit. My code looks like:

    //method of AsyncTask
    protected B         


        
2条回答
  •  广开言路
    2021-02-05 17:15

    The Call class has an execute() method that will make your call synchronously.

    enqueue() is explicitly for making an asychronous call.

提交回复
热议问题