title: Retrofit 2 Post response to different class
body: <p>I want to read response as a custom class but I have to use ResponseBody as a parameter in Post method.</p>
  
  <p>Post interface :</p>
  
  <pre><code>public interface IPostPhoneToken {
  @FormUrlEncoded
  @POST()
  Call&lt;ResponseBody&gt; postPhoneToken(
          @Field("data[UserPhoneToken][first_name]") String firstName,
          ...
          @Url String endpoint);
  }
  </code></pre>
  
  <p>Problem is here :</p>
  
  <pre><code> call.enqueue(new Callback&lt;ResponseBody&gt;() {
          @Override
          public void onResponse(Call&lt;ResponseBody&gt; call, Response&lt;ResponseBody&gt; response) {
              if(response.isSuccessful()){
              }
              else{
                  System.out.println(response.message());
              }
          }
          @Override
          public void onFailure(Call&lt;ResponseBody&gt; call, Throwable t) {
              System.out.println("Failed");
          }
      });
  </code></pre>
  
  <p>I want to change ResponseBody with different Class to be able to read response values. </p>
  
  <p>Thanks.</p>