title: How to post request parameters when using JsonArrayRequest in Volley
body: <p>I am newbie to Json parsing. I am trying to read a json data using <code>JsonArrayRequest</code> but I am little confused in sending parameters and use POST method.In case of <code>JsonObjectRequest</code> i can send the method type,url,params but In <code>JsonArrayRequest</code> how to send params like username and password and use POST method.please help me out.here is the code i have written.</p>
  
  <pre><code>final JsonArrayRequest jsonObjReq = new JsonArrayRequest(MySingleton.getInstance().getDOWNLOAD_SERVICES_URL(), new Response.Listener&lt;JSONArray&gt;() {
      @Override
      public void onResponse(JSONArray response) {
          try {
              if(response==null) {
                  pDialog.hide();
              }
              for (int i = 0; i &lt; response.length(); i++) {
                  jresponse = response.getJSONObject(i);
              }
              //String service_response = response.getString("SvcTypeDsc");
              Toast.makeText(getActivity().getApplicationContext(), "services" + jresponse, Toast.LENGTH_SHORT).show();
          } catch (JSONException e) {
              e.printStackTrace();
              Log.d("soservices", "sos" + e.getMessage());
          }
      }
  }, new Response.ErrorListener() {
      @Override
      public void onErrorResponse(VolleyError error) {
          VolleyLog.d("Login request", "Error: " + error.getMessage());
          Log.d("Volley Error:", "Volley Error:" + error.getMessage());
          Toast.makeText(getActivity(), "Unable to connect to server, try again later", Toast.LENGTH_LONG).show();
          pDialog.hide();
      }
  }) {
      @Override
      protected Map&lt;String, String&gt; getParams() throws AuthFailureError {
          Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
          params.put("uniquesessiontokenid","39676161-b890-4d10-8c96-7aa3d9724119");
          params.put("loginname", userDet.getSAID());
          params.put("password", "23295");
          return super.getParams();
       }
  
       @Override
       public int getMethod() {
           try {
               getParams();
           } catch (AuthFailureError authFailureError) {
               authFailureError.printStackTrace();
           }
               return super.getMethod();
           }
       };
  
       AppController.getInstance().addToRequestQueue(jsonObjReq, tag_json_obj);
  
  }
  </code></pre>
  
  <p>my json data is like:</p>
  
  <pre><code>{
      "username":"rushi",
      "firstname": "abc",
  },
  {
      "username": "xyz",
      "firstname": "vxa",
  },
  </code></pre>
  
  <p>The params are not being sent. Please help me solving this.
  Thank you in advance.</p>