title: How to send post Object with retrofit 2
body: <p>i have trouble sending a post request to my API. i need to send the data in a form like this</p>
  
  <pre><code>userinfo:{  
     Name="sample",
     Company="sample",
     Contact="Contact"
  },
  Password="",
  PasswordConfirm="",
  TokenStr=""
  }
  </code></pre>
  
  <hr>
  
  <p>Do I need to use <code>@Body</code> annotation to send my Request? 
  Here is my Sample Code(Updated)</p>
  
  <pre><code>ApiInterface apiService = ApiClient.getClient().create(ApiInterface.class);
          User userReg = new User("asd","asd","bryce@email.com","asd",
                  "asd","asd","asd","1");
          UserRegistration sendReg = new UserRegistration(userReg,"asd","asd",
                  token);
          final Call&lt;UserRegistration&gt; tableCall = apiService.getUserRegistration(sendReg);
          tableCall.enqueue(new Callback&lt;UserRegistration&gt;() {
              @Override
              public void onResponse(Call&lt;UserRegistration&gt; call, Response&lt;UserRegistration&gt; response) {
                  int statusCode = response.code();
                  if (response.isSuccessful()){
                      Log.e("asdasd",response.body().toString());
                  }else{
                      Log.e("asdas",response.message());
                  }
              }
  
              @Override
              public void onFailure(Call&lt;UserRegistration&gt; call, Throwable t) {
                  t.printStackTrace();
                  Log.e("ERROR",""+t.getMessage()+" "+t.getLocalizedMessage());
                  Toast.makeText(getApplicationContext(), ""+t.toString(), Toast.LENGTH_LONG).show();
              }
          });
  </code></pre>
  
  <hr>
  
  <p>and here is my ApiInterface(updated)</p>
  
  <pre><code>@POST("UserRegistration")
      @FormUrlEncoded
      Call&lt;UserRegistration&gt; getUserRegistration(@Body UserRegistration userRegistration);
  </code></pre>
  
  <hr>
  
  <p>I've added a Model Class</p>
  
  <pre><code>public class UserRegistration {
  
      User items;
      String Password;
      String PasswordConfirm;
      String TokenStr;
  
      public UserRegistration(User items, String password, String passwordConfirm, String tokenStr) {
          this.items = items;
          Password = password;
          PasswordConfirm = passwordConfirm;
          TokenStr = tokenStr;
      }
  }
  
  public class User {
  
      private String COMPANY;
      private String CONTACT_NO;
      private String EMAIL;
      private String FNAME;
      private String LNAME;
      private String MI;
      private String POSITION;
      private String RID;
  
      public User(String COMPANY, String CONTACT_NO, String EMAIL, String FNAME, String LNAME, String MI, String POSITION, String RID) {
          this.COMPANY = COMPANY;
          this.CONTACT_NO = CONTACT_NO;
          this.EMAIL = EMAIL;
          this.FNAME = FNAME;
          this.LNAME = LNAME;
          this.MI = MI;
          this.POSITION = POSITION;
          this.RID = RID;
      }
  }
  </code></pre>
  
  <p>Now I get an error saying @Body parameters cannot be used with form or multi-part encoding. (parameter #1).</p>
  
  <p>But i receive bad request. i know that my request is wrong. and im new to android. I tried to research on how to do this but I didnt find any helpful answers.</p>