Search code examples
androidjsongsonretrofit

Get json from request body by gson


How I can get json request body?

   App.getApi().method(data).enqueue(new Callback<Obj>() {
        @Override 
        public void onResponse(Call<Obj> call, Response<Obj> response){
             // print here 
        }
        ...
   };

Solution

  • If you are trying to print request / response while using retrofit you can enable logging check this article for same.