How to get the response URL from Retrofit?

前端 未结 6 855
感情败类
感情败类 2021-01-05 15:48

I\'m using Retrofit for REST web services my android project. It works fine overall untill the point I\'m trying to read several parameters from the return URL. For exapmle

6条回答
  •  攒了一身酷
    2021-01-05 16:15

    First create a call then print. See example below:

    ApiInterface apiService = ApiClient.getClient().create(ApiInterface.class);
    Call call = apiService.getLoginData(phone_number.getText().toString());
    Log.e(" Login url", call.request().url().toString());
    

提交回复
热议问题