Logging with Retrofit 2

前端 未结 21 1603
春和景丽
春和景丽 2020-11-22 07:33

I\'m trying to get the exact JSON that is being sent in the request. Here is my code:

OkHttpClient client = new OkHt         


        
21条回答
  •  不知归路
    2020-11-22 07:56

    Retrofit's interceptor is a great feature which allow you work with http requests. There are two types of them: application and network interceptors.

    I would recommend to use Charles Web Debugging Proxy Application if you need logging your requests/responses. The output is very similar to Stetho but it is more powerful instrument which you do not need to add as a dependency to an application

提交回复
热议问题