title: com.android.volly.AuthFailureError in making basic volly POST request to a django server
body: <p>I am trying to connect to a django server from my android application. I am trying to access my api, making a <code>POST</code> request with volly. Everything is set. All the params and headers required, but still I get this error. </p>
  
  <pre><code>log: [490] BasicNetwork.performRequest: Unexpected response code 401 for https://example.com/
  </code></pre>
  
  <p>It's not letting me access my django Api. It works fine with the PHP server. </p>
  
  <pre><code>    public void vollyRequest()
      {
          RequestQueue queue  = Volley.newRequestQueue(this);
          StringRequest request =  new StringRequest(Request.Method.POST  , "https://example.com/", new Response.Listener&lt;String&gt;() {
  
              @Override
              public void onResponse(String response) {
                  Toast.makeText(MainActivity.this, "RESPONSE: " + response, Toast.LENGTH_SHORT ).show();
              }
  
          }, new Response.ErrorListener() {
              @Override
              public void onErrorResponse(VolleyError error) {
                  Toast.makeText(MainActivity.this, "ERROR: " + error, Toast.LENGTH_SHORT ).show();
              }
          }) {
  
              @Override
              protected Map&lt;String,String&gt; getParams(){
                  Map&lt;String,String&gt; params = new HashMap&lt;String, String&gt;();
                  params.put("username","***");
                  params.put("password","***");
                  return params;
                  }
  //            @Override
  //            public Map&lt;String, String&gt; getHeaders() throws AuthFailureError {
  //            Map&lt;String,String&gt; params = new HashMap&lt;String, String&gt;();
  //            params.put("Content-Type","application/x-www-form-urlencoded");
  //            return params;
  //            }
          };
          queue.add(request);
      }
  </code></pre>