title: Retrofit Error :500 Internal server error in Android
body: <p>Am Using retrofit for my connection with server,My app has signin page and signout page During Login i get the value from text box and send using POST request to the server It works fine, </p>
  
  <pre><code>   public void LoginUser(View v)
  
  {RestAdapter adapter = new RestAdapter.Builder()      
              .setEndpoint(ROOT_URL)
              .build(); 
  
      WashAPI api = adapter.create(WashAPI.class);
  
      api.LoginUser(
  
  
  
              Email.getText().toString(),
              Password.getText().toString(),
  
              //Creating an anonymous callback
              new Callback&lt;Response&gt;() {
                  @Override
                  public void success(Response result, Response response) {
                      //On success we will read the server's output using bufferedreader
                      //Creating a bufferedreader object
                      BufferedReader reader = null;
  
                      //An string to store output from the server
                      String output = "";
  
                      try {
                          //Initializing buffered reader
                          reader = new BufferedReader(new InputStreamReader(result.getBody().in()));
  
                          //Reading the output in the string
                          output = reader.readLine();
                      } catch (IOException e) {
                          e.printStackTrace();
                      }
  </code></pre>
  
  <p>Interface for signin</p>
  
  <pre><code>public interface WashAPI {
  @FormUrlEncoded
  @POST("/xxx/yyy/signin")
  public void LoginUser(
          @Field("email") String email,
          @Field("password") String password,
  
          Callback&lt;Response&gt; callback);
  
  }
  </code></pre>
  
  <p>This works good </p>
  
  <p>After login with my server API it returns me a token, At the time of signout i need to send the token so my session get experied.</p>
  
  <p>code for signout   </p>
  
  <pre><code>public void signout(View v)
  {
      Log.d("insidetoken",t);
      RestAdapter adapter = new RestAdapter.Builder()
              .setEndpoint(ROOT_URL)
              .build();
      SignoutAPI api = adapter.create(SignoutAPI.class);
               api.signout(t,
                      new Callback&lt;Response&gt;() {
                          @Override
                          public void success(Response result, Response response) {
  
                              BufferedReader reader = null;
                              String output = "";
                              try {
                                  reader = new BufferedReader(new InputStreamReader(result.getBody().in()));
                                  output = reader.readLine();
                              } catch (IOException e) {
                                  e.printStackTrace();
                              }
  </code></pre>
  
  <p>Interface for signout</p>
  
  <pre><code>public interface SignoutAPI {
  @FormUrlEncoded
  @POST("/xxx/yyy/zzz/signout")
  public void signout(
         @Field("token") String token,
          Callback&lt;Response&gt; callback);
  </code></pre>
  
  <p>}</p>
  
  <p>My code is same for both signin and sigout</p>
  
  <p>but for signin it works and for signout it gives me RETROFIT ERROR : 500 INTERNAL SERVER ERROR</p>
  
  <p>But Using POSTMAN It works fine<a href="https://i.stack.imgur.com/E9tDR.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E9tDR.jpg" alt="enter image description here"></a></p>