title: Android: Volley HTTP Request custom header
body: <p>I'm getting the following error when I run the app:
  BasicNetwork.performRequest: Unexpected response code 401</p>
  
  <p>I need to pass an email, a password and a token to access the URL, but it's not working</p>
  
  <p>I started learn android last week, I don't know much</p>
  
  <pre><code>package quest.testvolley;
  
  import com.android.volley.AuthFailureError;
  import com.android.volley.VolleyLog;
  import com.kpbird.volleytest.R;
  
  import android.app.ProgressDialog;
  import android.os.Bundle;
  import android.app.Activity;
  import android.util.Log;
  import android.view.LayoutInflater;
  import android.view.Menu;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.BaseAdapter;
  import android.widget.ListView;
  import android.widget.TextView;
  import com.android.volley.Request;
  import com.android.volley.RequestQueue;
  import com.android.volley.Response;
  import com.android.volley.VolleyError;
  import com.android.volley.toolbox.JsonObjectRequest;
  import com.android.volley.toolbox.Volley;
  import org.json.JSONArray;
  import org.json.JSONObject;
  
  import java.net.URL;
  import java.util.ArrayList;
  import java.util.HashMap;
  import java.util.Map;
  
  public class MainActivity extends Activity {
  
      private String TAG = this.getClass().getSimpleName();
      private ListView lstView;
      private RequestQueue mRequestQueue;
      private ArrayList&lt;NewsModel&gt; arrNews ;
      private LayoutInflater lf;
      private VolleyAdapter va;
      private ProgressDialog pd;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
  
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          lf = LayoutInflater.from(this);
  
          arrNews = new ArrayList&lt;NewsModel&gt;();
          va = new VolleyAdapter();
  
          lstView = (ListView) findViewById(R.id.listView);
          lstView.setAdapter(va);
          mRequestQueue =  Volley.newRequestQueue(this);
          String url = "http://192.168.1.18/repr/api/clientes/Y2FtcG9zKGlkLG5vbWUsc3RhdHVzKTppnaW1pdCgxMCk6b2Zmc2V0KDApOm9yZGVtKG5vbWVbYXNjXSk=";
          pd = ProgressDialog.show(this,"Please Wait...","Please Wait...");
          try{
  
              Thread.sleep(2000);
          }catch(Exception e){}
  
          JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, url, null, new Response.Listener&lt;JSONObject&gt;() {
  
              @Override
              public void onResponse(JSONObject response) {
  
                  Log.d(TAG, response.toString());
                  pd.hide();
              }
          }, new Response.ErrorListener() {
  
              @Override
              public void onErrorResponse(VolleyError error) {
  
                  VolleyLog.d(TAG, "Error: " + error.getMessage());
                  pd.hide();
              }
          }) {
  
              @Override
              protected Map&lt;String, String&gt; getParams() {
  
                  Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
                  params.put("email", "rm@test.com.br");
                  params.put("senha", "test");
                  params.put("X-API-TOKEN", "99KI9Gj68CgCf70deM22Ka64chef2C40Gm2lFJ2J0G9JkD0afd19MfacGf3FFm8CM1hG0eDiIk8");
  
                  return params;
              }
          };
  
          mRequestQueue.add(jsonObjReq);
      }
  </code></pre>