Retrofit callback get response body

前端 未结 9 1230
星月不相逢
星月不相逢 2020-12-05 04:05

I am testing Retrofit to compare it with Volley and I am struggling to get the response from my requests. For example, I do something like this:

RestAdapter          


        
9条回答
  •  感情败类
    2020-12-05 04:55

    in your model of response press cmd+n and override "toString" method and only call as response.toString();

    @Override
    public String toString() {
        return "{" +
                "key_one='" + var_keyone + '\'' +
                ", key_two='" + var_keytwo + '\'' +
                '}';
    }
    

提交回复
热议问题