how to get the raw response in retrofit2 instead of POJO
<p>I am using Retrofit2 for all the network calls in my android application. Im configuring a POJO for a particular response. But I want to just check the raw Json repsonse for some extra response which is not included as a variable in POJO. </p>

<p>POJO</p>

<pre><code>public class User {

  @SerializedName("user_id")
  private long userId;

  @SerializedName("user_name")
  private String userName;

  @SerializedName("hobbies")
  private String hobbies;

  @SerializedName("class")
  private String studyClass;

  @SerializedName("branch_id")
  private long branchId;

  @SerializedName("createdOn")
  private Date createdOn;
}
</code></pre>

<p>My network interface</p>

<pre><code>public interface ApiInterface {

  @GET("user/{userId}")
  Call&lt;User&gt; getUserInfo(@Path("userId") long userId);
}
</code></pre>

<p>My code for requesting the data .</p>

<pre><code>if (retrofit == null) {
        retrofit = new Retrofit.Builder()
                .baseUrl(BASE_URL)
                .addConverterFactory(GsonConverterFactory.create(gson))
                .build();
    }
ApiInterface apiService = retrofit.create(ApiInterface.class);
Call&lt;User&gt; call = apiService.getUserInfo(userId);
    call.enqueue(new Callback&lt;User&gt;() {
        @Override
        public void onResponse(Call&lt;User&gt; call, Response&lt;User&gt; response) {
            User user = response.body();
            setViews(user);
        }

        @Override
        public void onFailure(Call&lt;User&gt; call, Throwable t) {
            Toast.makeText(getApplicationContext(), "On failure while requesting server", Toast.LENGTH_LONG).show();
        }
    });
</code></pre>

<p>How to check the raw response . But I want the interface method to return the POJO.</p>