title: Android Volley Post Request - Workaround for JsonArrayRequest
body: <p>I understand that POST requests using JsonArrayRequest are not available out of the box with Volley, but I saw this post <a href="https://stackoverflow.com/questions/18048806/volley-sending-a-post-request-using-jsonarrayrequest">here</a> that talked about adding a constructor to handle this. Their implementation was this:</p>
  
  <pre><code>public JsonArrayRequest(int method, String url, JSONObject jsonRequest,
          Listener&lt;JSONArray&gt; listener, ErrorListener errorListener) {
      super(method, url, (jsonRequest == null) ? null : jsonRequest.toString(), 
          listener, errorListener);
  }
  </code></pre>
  
  <p>How would I go about adding this as a constructor? The above question mentions placing it in the Volley Tool Library. I imported Volley as a .jar, so I'm not sure how to add a constructor like this, or if this is the best approach. Any help is much appreciated.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I've created the following class with override and constructor as suggested. Here is the class:</p>
  
  <pre><code>public class PostJsonArrayRequest extends JsonArrayRequest {
  
      @Override
      protected Map&lt;String, String&gt; getParams() throws AuthFailureError {
          HashMap&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
          params.put("name", "value");
          return params;
      }
  
      public PostJsonArrayRequest(int method, String url, JSONObject jsonRequest,
              Listener&lt;JSONArray&gt; listener, ErrorListener errorListener) {
          super(Method.POST, url, null, listener, errorListener);
      }
  }
  </code></pre>
  
  <p>On the line calling super I'm getting <code>The constructor JsonArrayRequest(int, String, null, Response.Listener&lt;JSONArray&gt;, Response.ErrorListener) is undefined</code></p>
  
  <p>How do I correct this?</p>