title: Retrofit Post Parameter
body: <p>I am implementing login feature and for that using Post request but i am getting error saying </p>
  
  <blockquote>
    <p>"retrofit.RetrofitError:
    com.squareup.okhttp.internal.http.HttpMethod.METHODS"</p>
  </blockquote>
  
  <p>Below is my code</p>
  
  <pre><code>import java.util.HashMap;
  import java.util.Map;
  
  import retrofit.Callback;
  import retrofit.http.*;
  
  
  
  
  //Myapi.java
  
  import java.util.HashMap;
  import java.util.Map;
  
  import retrofit.Callback;
  import retrofit.http.*;
  
  public interface MyApi {
  
      /* LOGIN */
      @POST("/api/0.01/oauth2/access_token/")
      // your login function in your api
      public void login(@Body HashMap&lt;String, String&gt; arguments, Callback&lt;String&gt; calback);
  }
  
  
  //In my activity
  RestAdapter restAdapter = new RestAdapter.Builder()
                  .setEndpoint(Constants_Interface.URL).setClient(newclient)
                  .build();
  
          MyApi mylogin = restAdapter.create(MyApi.class); 
  HashMap&lt;String, String&gt; dicMap = new HashMap&lt;String, String&gt;();
  dicMap.put("client_id", XXX);
          dicMap.put("client_secret", XXX);
          dicMap.put("username", XXX);
          dicMap.put("password", XXX);
  mylogin.login(dicMap, new Callback&lt;String&gt;() {
  
              @Override
              public void failure(RetrofitError retrofitError) {
                  retrofitError.printStackTrace(); // to see if you have
                                                      // errors
              }
  
              @Override
              public void success(String s, retrofit.client.Response response) {
                  // TODO Auto-generated method stub
                  Toast.makeText(getApplicationContext(), "Login Succes",
                          Toast.LENGTH_LONG).show();
  
              }
          });
  </code></pre>
  
  <p>Below it logcat output.</p>
  
  <blockquote>
    <p>02-10 13:02:43.846: W/System.err(30684): retrofit.RetrofitError:
    com.squareup.okhttp.internal.http.HttpMethod.METHODS 02-10</p>
  </blockquote>