title: Android Volley: Unexpected response code 405
body: <p>My Android Volley JsonObjectRequest runs into onErrorResponse with the issue: </p>
  
  <pre><code>BasicNetwork.performRequest: Unexpected response code 405 for MY_URL
  </code></pre>
  
  <p>My URL is valid. I have checked that with a browser and 
  I get there the expected JSON Object. 
  So the issue has to be on the client side. </p>
  
  <p>The code 405 means: </p>
  
  <blockquote>
    <p>Method Not Allowed The method specified in the Request-Line is not
    allowed  for the resource identified by the Request-URI.  The response
    MUST include an Allow header containing a list of valid methods for
    the requested resource.</p>
  </blockquote>
  
  <p>my code for JsonObjectRequest:</p>
  
  <pre><code>JsonObjectRequest jsonReq;
              jsonReq = new JsonObjectRequest(URL_FEED, new JSONObject(),
                      new Response.Listener&lt;JSONObject&gt;() {
                          @Override
                          public void onResponse(JSONObject response) {
                              try {
                                  VolleyLog.v("Response:%n %s", response.toString(4));
                              } catch (JSONException e) {
                                  e.printStackTrace();
                              }
                          }
                      }, new Response.ErrorListener() {
                  @Override
                  public void onErrorResponse(VolleyError error) {
                      VolleyLog.v("ERROR:%n %s", error.getMessage());
                  }
              });
  
              // Adding request to volley request queue
              NetworkController.getInstance().addToRequestQueue(jsonReq);
  </code></pre>
  
  <p>Do I have to add some information to the header? And if what for information?</p>