Iam在android中调用web服务。在这我要拨打的URL我没有发送任何PARAMS到服务器,只需调用URL,BasicNetwork.performRequest:意外的响应代码401 Android Volley库
但它越来越像错误[10520] BasicNetwork.performRequest:意外的响应代码401
我代码是
RequestQueue queue = Volley.newRequestQueue(getActivity());
JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.GET, Server.URL, null,
new Response.Listener<JSONObject>()
{
@Override
public void onResponse(JSONObject response) {
// display response
hideProgressDialog();
}
},
new Response.ErrorListener()
{
@Override
public void onErrorResponse(VolleyError error) {
hideProgressDialog();
}
}
);
// add it to the RequestQueue
queue.add(getRequest);
如何解决这个问题?
我打电话登录Web服务与JSON PARAMS其工作正常后,登录Web服务调用其不工作。任何猜测? – John 2015-04-06 09:45:17
我是否需要将曲奇添加到排球头? – John 2015-04-06 09:46:04
是的,这些图像需要身份验证 – 2015-04-06 09:47:03