http://www.jb51.net/article/43462.htm
2.volley框架添加请求头时要调用
Volley.newRequestQueue(this,new HurlStack());
再重写
@Override public Map<String, String> getHeaders() throws AuthFailureError { Map<String, String> headers = new HashMap<String, String>(); // headers.put("Charset", "UTF-8"); // headers.put("Content-Type", "application/x-javascript"); // headers.put("Accept-Encoding", "gzip,deflate"); headers.put("Authorization", "Basic YW5vbnltb3VzOjEyMzQ1Ng=="); return headers; }