title: Retrofit POST request response.isSuccessful() returning false
body: <p>I am trying to make <code>POST</code> request using Retrofit2. But I am in a situation where the <code>response.isSuccessful()</code> is returning false and I do not know how to debug it. I checked my backend's logs and there are no errors, nothing.</p>
  
  <p>I made sure that the request's URL is correct, also that all the parameters are right. What I am doing wrong? For me it seems that the request even doesn't make it to my server.</p>
  
  <p>This is what I do:</p>
  
  <p>I have class User with getters and setters:</p>
  
  <pre><code>public class User {
      @SerializedName("user_id")
      @Expose
      private int id;
      @SerializedName("first_name")
      @Expose
      private String firstName;
      @SerializedName("last_name")
      @Expose
      private String lastName;
  
      public int getId() {
          return id;
      }
  
      public void setId(Integer id) {
          this.id = id;
      }
  
      public String getFirstName() {
          return firstName;
      }
  
      public void setFirstName(String firstName) {
          this.firstName = firstName;
      }
  
      public String getLastName() {
          return lastName;
      }
  
      public void setLastName(String lastName) {
          this.lastName = lastName;
      }
  }
  </code></pre>
  
  <p>And I have my service:</p>
  
  <pre><code>public interface APIService {
  
      @POST("auth/register")
      @FormUrlEncoded
      Call&lt;User&gt; register(@Field("email") String email, @Field("password") String password);
  }
  </code></pre>
  
  <p>Now I try to execute it, which returns false in response block:</p>
  
  <pre><code>private void registerUser(){
          Call&lt;User&gt; registerCall = apiService.register(email, password);
  
          registerCall.enqueue(new Callback&lt;User&gt;() {
              @Override
              public void onResponse(Call&lt;User&gt; call, Response&lt;User&gt; response) {
  
                  if(response.isSuccessful()){
                      int id = response.body().getId();
                      String firstName = response.body().getFirstName();
                      String lastName = response.body().getLastName();
  
                  }else{
                      System.out.println("ERROR "+response.raw().body());
                  }
  
              }
  
              @Override
              public void onFailure(Call&lt;User&gt; call, Throwable t) {
  
              }
          });
      }
  </code></pre>
  
  <p>Edit: This is the ApiUtils:</p>
  
  <pre><code>public class ApiUtils {
  
      private ApiUtils() {}
  
      public static final String BASE_URL = "https://api.mydomain.com/";
  
      public static APIService getAPIService() {
  
          return RetrofitClient.getClient(BASE_URL).create(APIService.class);
      }
  }
  </code></pre>
  
  <p>What I am doing wrong? How I can do more debugging? Any help is appreciated.</p>