title: How to send 2 parameters in body with retrofit?
body: <p>Good night everybody.
  I need to do a POST request and I'm using Retrofit 2 to do this.
  But the Api I'm consuming does not give me these parameters in the API response, just in the body.</p>
  
  <p><strong>Api Response</strong></p>
  
  <p><img src="https://i.stack.imgur.com/AIpH5.png" alt="API response Image"></p>
  
  <p>I already searched in some places but I did not find anything that could help me.</p>
  
  <p><strong>My interface Class</strong></p>
  
  <pre><code>public interface LoginApi {
      @POST("api/login")
      Call&lt;UserAccount&gt; doLogin(@Body Login login);
  }
  </code></pre>
  
  <p><strong>My Model Class</strong></p>
  
  <pre><code>public class Login {
      public String user;
      public String password;
  }
  </code></pre>
  
  <p><strong>My API response class</strong></p>
  
  <pre><code>public class UserAccount {
      @SerializedName("userId")
      @Expose
      private Integer userId;
  
      @SerializedName("name")
      @Expose
      private String name;
  
      @SerializedName("bankAccount")
      @Expose
      private String bankAccount;
  
      @SerializedName("agency")
      @Expose
      private String agency;
  
      @SerializedName("balance")
      @Expose
      private Double balance;
  }
  </code></pre>
  
  <p><strong>My call class</strong></p>
  
  <pre><code>public class LoginPresenter {
  
      private LoginView loginView;
      private ServiceConfig serviceConfig;
  
      public LoginPresenter() {
          this.loginView = loginView;
  
          if (this.serviceConfig == null) {
              this.serviceConfig = new ServiceConfig();
          }
      }
  
      public void doLogin(Login login) {
          serviceConfig
                  .login()
                  .doLogin(login)
                  .enqueue(new Callback&lt;UserAccount&gt;() {
                      @Override
                      public void onResponse(Call&lt;UserAccount&gt; call, Response&lt;UserAccount&gt; response) {
                          UserAccount userAccount = response.body();
                          assert userAccount != null;
                          Log.e("Agency:",userAccount.getAgency());
                          Log.e("BankAccount:", userAccount.getBankAccount());
                          Log.e("Name:", userAccount.getName());
                      }
  
                      @Override
                      public void onFailure(Call&lt;UserAccount&gt; call, Throwable t) {
                          Log.d("Erro", t.getMessage());
                      }
                  });
          }
  }
  </code></pre>
  
  <p><strong>My Activity</strong></p>
  
  <pre><code>public class LoginActivity extends Activity implements LoginView {
  
      private EditText edtUser, edtPassword;
      private Button btnLogin;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_login);
          init();
      }
  
      private void init() {
          edtUser = findViewById(R.id.edt_user);
          edtPassword = findViewById(R.id.edt_password);
          btnLogin = findViewById(R.id.btn_login);
          final LoginPresenter loginPresenter = new LoginPresenter();
          final Login login = new Login();
          login.user = edtUser.getText().toString();
          login.password = edtPassword.getText().toString();
          btnLogin.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  loginPresenter.doLogin(login);
              }
          });
      }
  
      @Override
      public void userAccount(List&lt;UserAccount&gt; userAccount) {
  
      }
  }
  </code></pre>
  
  <p>I hope I have made my problem clear and that someone who has been through it can help me.
  Appreciate.</p>