title: How do I use the generic type T with Retrofit?
body: <p>I want to use T in Retrofit, but I do not know, how to set T in Retrofit.create(X.class) method.</p>
  
  <pre class="lang-java prettyprint-override"><code>public interface SupportService&lt;T&gt; {
      @GET
      Flowable&lt;BaseResponse&lt;T&gt;&gt; getApi(@Url String url, @Query("data") JsonObject jsonObject);
  }
  </code></pre>
  
  <pre><code>
  HttpRetrofit.getInstance()
                  .getRetrofit(this)
                  .&lt;SupportService&lt;T&gt;&gt;create(SupportService.class)
                  .getApi("",null)
  </code></pre>
  
  <pre><code>public class BaseResponse&lt;T&gt;{
      public int code;
      public String message;
      public T data;   
  }
  </code></pre>