title: How to replace Hurlstack for Volley?
body: <p>I see an issue with the Volley library with respect to their DELETE method. If you look at the HurlStack class, and find setConnectionParametersForRequest() method, you will see the following: </p>
  
  <pre><code>static void setConnectionParametersForRequest(HttpURLConnection connection, Request&lt;?&gt; request) throws IOException, AuthFailureError {
      switch(request.getMethod()) {
      case -1:
          byte[] postBody = request.getPostBody();
          if(postBody != null) {
              connection.setDoOutput(true);
              connection.setRequestMethod("POST");
              connection.addRequestProperty("Content-Type", request.getPostBodyContentType());
              DataOutputStream out = new DataOutputStream(connection.getOutputStream());
              out.write(postBody);
              out.close();
          }
          break;
      case 0:
          connection.setRequestMethod("GET");
          break;
      case 1:
          connection.setRequestMethod("POST");
          addBodyIfExists(connection, request);
          break;
      case 2:
          connection.setRequestMethod("PUT");
          addBodyIfExists(connection, request);
          break;
      case 3:
          connection.setRequestMethod("DELETE");
          break;
      default:
          throw new IllegalStateException("Unknown method type.");
      }
  
  }
  </code></pre>
  
  <p>Notice that the DELETE method does not have "addBodyIfExists(connection, request)". This is an issue because now if you use the DELETE method and you want/need to include a body you are not able to. My question is, how can I replace this HurlStack and use a custom HurlStack where I can include the body for my DELETE method?</p>