am 4d868f01: am b1a9085e: Merge "Add support for all HTTP methods to JsonArrayRequest"

* commit '4d868f015dd8525f560398168f522750cfbe652b':
  Add support for all HTTP methods to JsonArrayRequest
diff --git a/src/main/java/com/android/volley/toolbox/JsonArrayRequest.java b/src/main/java/com/android/volley/toolbox/JsonArrayRequest.java
index e932a61..ba35d26 100644
--- a/src/main/java/com/android/volley/toolbox/JsonArrayRequest.java
+++ b/src/main/java/com/android/volley/toolbox/JsonArrayRequest.java
@@ -42,6 +42,21 @@
         super(Method.GET, url, null, listener, errorListener);
     }
 
+    /**
+     * Creates a new request.
+     * @param method the HTTP method to use
+     * @param url URL to fetch the JSON from
+     * @param jsonRequest A {@link JSONArray} to post with the request. Null is allowed and
+     *   indicates no parameters will be posted along with request.
+     * @param listener Listener to receive the JSON response
+     * @param errorListener Error listener, or null to ignore errors.
+     */
+    public JsonArrayRequest(int method, String url, JSONArray jsonRequest,
+                            Listener<JSONArray> listener, ErrorListener errorListener) {
+        super(method, url, (jsonRequest == null) ? null : jsonRequest.toString(), listener,
+                errorListener);
+    }
+
     @Override
     protected Response<JSONArray> parseNetworkResponse(NetworkResponse response) {
         try {
diff --git a/src/test/java/com/android/volley/toolbox/JsonRequestTest.java b/src/test/java/com/android/volley/toolbox/JsonRequestTest.java
index d999d50..e39c8c8 100644
--- a/src/test/java/com/android/volley/toolbox/JsonRequestTest.java
+++ b/src/test/java/com/android/volley/toolbox/JsonRequestTest.java
@@ -17,6 +17,7 @@
 package com.android.volley.toolbox;
 
 import com.android.volley.Response;
+import org.json.JSONArray;
 import org.json.JSONObject;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -37,6 +38,8 @@
 
         assertNotNull(JsonArrayRequest.class.getConstructor(String.class,
                 Response.Listener.class, Response.ErrorListener.class));
+        assertNotNull(JsonArrayRequest.class.getConstructor(int.class, String.class, JSONArray.class,
+                Response.Listener.class, Response.ErrorListener.class));
 
         assertNotNull(JsonObjectRequest.class.getConstructor(String.class, JSONObject.class,
                 Response.Listener.class, Response.ErrorListener.class));