title: Volley post method return response code 500
body: <p>Always i get below error response when using volley</p>
  
  <pre><code>06-24 15:06:59.244: E/Volley(12869): [2311] BasicNetwork.performRequest: Unexpected response code 500 for http://My_API
  </code></pre>
  
  <p>my code for Volley call </p>
  
  <pre><code>String sSignupUrl = STController.getInstance()
                  .getResourceManager(LoginActivity.this)
                  .getServerPropertyValue(URLConstants.API_LOGIN);
  JSONObject params = new JSONObject();
          try {
              params.put("username", "usernam");
              params.put("passwd", "password");
          } catch (JSONException e) {
              e.printStackTrace();
          }
          JsonObjectRequest jsonObjReq = new JsonObjectRequest(Method.POST,
                  sSignupUrl, params, new Response.Listener&lt;JSONObject&gt;() {
  
                      @Override
                      public void onResponse(JSONObject response) {
                          LogUtil.d("TAG" + response.toString());
                      }
                  }, new Response.ErrorListener() {
  
                      @Override
                      public void onErrorResponse(VolleyError error) {
                          VolleyLog.d("TAG", "Error: " + error.getMessage());
                      }
                  }) {
  
              @Override
              public Map&lt;String, String&gt; getHeaders() throws AuthFailureError {
                  HashMap&lt;String, String&gt; headers = new HashMap&lt;String, String&gt;();
                  headers.put("Content-Type", "application/json; charset=utf-8");
                  return headers;
              }
  
          };
  
          // Adding request to request queue
          AppController.getInstance().addToRequestQueue(jsonObjReq);
  </code></pre>
  
  <p>I can successfully get the response when using URLConnection manager, not able to find the error, i have search through google but dint get proper solution, all answers are most welcome 
  Thanks in advance</p>