title: Retrofit response success but null result
body: <p>Interface:</p>
  
  <pre><code>public interface BabService {
  
      @GET("bab.php")
      Call&lt;Respon&gt; tampil(@Query("imam") String imam);
  }
  </code></pre>
  
  <p>Respon:</p>
  
  <pre><code>public class Respon {
  
      private String value;
      private List&lt;BabResult&gt; resultBab;
  
      public String getValue() {
          return value;
      }
  
      public List&lt;BabResult&gt; getResultBab() { return resultBab; }
  }
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>public class BabResult {
  
      private String id_bab;
      private String id_kitab;
      private String bab;
  
      public String getId_bab() { return id_bab; }
  
      public String getId_kitab() {
          return id_kitab;
      }
  
      public String getBab() {
          return bab;
      }
  }
  </code></pre>
  
  <p>Adapter:</p>
  
  <pre><code>public class BabAdapter extends RecyclerView.Adapter&lt;BabAdapter.ViewHolder&gt; 
  
  {
  
      private Context context;
      private List&lt;BabResult&gt; results;
      private String idBab, judulBab;
      private int no;
  
      public BabAdapter(Context context, List&lt;BabResult&gt; results) {
          this.context = context;
          this.results = results;
      }
  
      @Override
      public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_bab, parent, false);
          ViewHolder holder = new ViewHolder(v);
  
          return holder;
      }
  
      @Override
      public void onBindViewHolder(ViewHolder holder, int position) {
          if(position % 2 != 0){
              holder.vBab.setBackgroundResource(R.color.ijo);
          }else{
              holder.vBab.setBackgroundResource(R.color.oren);
          }
  
          no = position + 1;
          BabResult result = results.get(position);
          idBab = result.getId_bab();
          judulBab = result.getBab();
          holder.tvNo.setText(no);
          holder.tvBab.setText(judulBab);
      }
  
      @Override
      public int getItemCount() {
          if(results == null){
              return 4;
          }
          return results.size();
      }
  
      public class ViewHolder extends RecyclerView.ViewHolder {
  
          private View vBab;
          private TextView tvBab, tvNo;
  
          public ViewHolder(View itemView) {
              super(itemView);
              vBab = (View) itemView.findViewById(R.id.v_bab);
              tvNo = (TextView) itemView.findViewById(R.id.tv_no);
              tvBab = (TextView) itemView.findViewById(R.id.tv_bab);
              itemView.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View view) {
                      Intent i = new Intent(context, HadisList.class);
                      i.putExtra("id", idBab);
                      i.putExtra("bab", judulBab);
                      i.putExtra("no", no);
                      context.startActivity(i);
                  }
              });
          }
      }
  }
  </code></pre>
  
  <p>Activity:</p>
  
  <pre><code>public class MenuBab extends AppCompatActivity {
  
      public static final String URL = "http://mi3bpolinema.000webhostapp.com/";
      private List&lt;BabResult&gt; results = new ArrayList&lt;&gt;();
      private BabAdapter babAdapter;
      private ProgressBar pbLoading;
      private RecyclerView rvBab;
      private TextView tvImam;
      private String imam, namaImam;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_menu_bab);
  
          if(getSupportActionBar() != null){
              getSupportActionBar().hide();
              getSupportActionBar().setDisplayHomeAsUpEnabled(true);
          }
  
          Intent intent = getIntent();
          if(intent != null){
              if(intent.getStringExtra("imam") != null){
                  imam = intent.getStringExtra("imam");
                  namaImam = intent.getStringExtra("nama");
              }
          }
  
          pbLoading = (ProgressBar) findViewById(R.id.pb_loading);
          rvBab = (RecyclerView) findViewById(R.id.rv_bab);
          tvImam = (TextView) findViewById(R.id.tv_imam);
  
          tvImam.setText(namaImam);
          babAdapter = new BabAdapter(this, results);
          RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
          rvBab.setLayoutManager(mLayoutManager);
          rvBab.setItemAnimator(new DefaultItemAnimator());
          rvBab.setAdapter(babAdapter);
  
          loadDataBab();
      }
  
      @Override
      protected void onResume() {
          super.onResume();
          loadDataBab();
      }
  
      private void loadDataBab() {
          Retrofit retrofit = new Retrofit
                  .Builder()
                  .baseUrl(URL)
                  .addConverterFactory(GsonConverterFactory.create())
                  .build();
          BabService api = retrofit.create(BabService.class);
          Call&lt;Respon&gt; call = api.tampil(imam);
          call.enqueue(new Callback&lt;Respon&gt;() {
              @Override
              public void onResponse(Call&lt;Respon&gt; call, Response&lt;Respon&gt; response) {
                  String value = response.body().getValue();
                  pbLoading.setVisibility(View.GONE);
                  if (value.equals("1")) {
                      results = response.body().getResultBab();
                      babAdapter = new BabAdapter(MenuBab.this, results);
                      rvBab.setAdapter(babAdapter);
                  }
              }
  
              @Override
              public void onFailure(Call&lt;Respon&gt; call, Throwable t) {
  
              }
          });
      }
  }
  </code></pre>
  
  <p>On retrofit get result null, but when I run in website get result like this:</p>
  
  <pre><code>{"value":1,"result":[{"id_bab":"4","id_kitab":"1","bab":"Wudhu"},
  {"id_bab":"8","id_kitab":"1","bab":"Shalat"},
  {"id_bab":"15","id_kitab":"1","bab":"Puasa"}]}
  </code></pre>
  
  <p>using <a href="http://mi3bpolinema.000webhostapp.com/bab.php?imam=1" rel="nofollow noreferrer">this</a> link. </p>