title: Volley Post JsonObjectRequest ignoring parameters while using getHeader and getParams
body: <p>I am trying to connect API url="api adress" which accepts two header types application/json to reponce in json and application/xml to reponce in xml. I need to hit JSON with json parameters and responce will be in json format too. Using android volley Post request with JsonObjectRequest setting headers using getHeaders it connects to server but getParams to set parameters does not work.</p>
  
  <pre><code>RequestQueue queue = Volley.newRequestQueue(this);
  JsonObjectRequest jsonObjReq = new JsonObjectRequest(Method.POST,
              Constants.BASE_URL + Constants.LOGIN, null, response,
              response_error) {
          /**
           * Passing some request headers
           * */
          @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");
              return headers;
          }
           @Override
           protected Map&lt;String, String&gt; getPostParams()
           throws AuthFailureError {
           // TODO Auto-generated method stub
              Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
              params.put("key", "value");
              return params;
           }
      };
      // implementation of listeners
      Response.Listener&lt;JSONObject&gt; response = new Response.Listener&lt;JSONObject&gt;() {
  
          @Override
          public void onResponse(JSONObject response) {
              Log.d(TAG, response.toString());
              Log.e("responce", response.toString());
  
              // msgResponse.setText(response.toString());
              hideProgressDialog();
          }
      };
      Response.ErrorListener response_error = new Response.ErrorListener() {
  
          @Override
          public void onErrorResponse(VolleyError error) {
              Log.e("error responce", error.getMessage());
              VolleyLog.d(TAG, "Error: " + error.getMessage());
              hideProgressDialog();
          }
      };
  //get params never get called
  //i also tried alternative to send params but does not works.
          Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
              params.put("key", "value");
          JsonObjectRequest jsonObjReq = new JsonObjectRequest(Method.POST,
              Constants.BASE_URL + Constants.LOGIN, new JSONObject(params), response,
              response_error) {
          /**
           * Passing some request headers
           * */
          @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");
              return headers;
          }
  };
  
      any type of help will be appretiated, Thanks in advance.
  </code></pre>