Android 截击post方法返回响应代码500

Android 截击post方法返回响应代码500,android,web-services,android-volley,Android,Web Services,Android Volley,当使用截击时,我总是得到低于错误响应 06-24 15:06:59.244: E/Volley(12869): [2311] BasicNetwork.performRequest: Unexpected response code 500 for http://My_API 我的截击密码 String sSignupUrl = STController.getInstance() .getResourceManager(LoginActivity.this)

当使用截击时,我总是得到低于错误响应

06-24 15:06:59.244: E/Volley(12869): [2311] BasicNetwork.performRequest: Unexpected response code 500 for http://My_API
我的截击密码

String sSignupUrl = STController.getInstance()
                .getResourceManager(LoginActivity.this)
                .getServerPropertyValue(URLConstants.API_LOGIN);
JSONObject params = new JSONObject();
        try {
            params.put("username", "usernam");
            params.put("passwd", "password");
        } catch (JSONException e) {
            e.printStackTrace();
        }
        JsonObjectRequest jsonObjReq = new JsonObjectRequest(Method.POST,
                sSignupUrl, params, new Response.Listener<JSONObject>() {

                    @Override
                    public void onResponse(JSONObject response) {
                        LogUtil.d("TAG" + response.toString());
                    }
                }, new Response.ErrorListener() {

                    @Override
                    public void onErrorResponse(VolleyError error) {
                        VolleyLog.d("TAG", "Error: " + error.getMessage());
                    }
                }) {

            @Override
            public Map<String, String> getHeaders() throws AuthFailureError {
                HashMap<String, String> headers = new HashMap<String, String>();
                headers.put("Content-Type", "application/json; charset=utf-8");
                return headers;
            }

        };

        // Adding request to request queue
        AppController.getInstance().addToRequestQueue(jsonObjReq);
String sSignupUrl=STController.getInstance()
.getResourceManager(LoginActivity.this)
.getServerPropertyValue(urlstants.API\u登录名);
JSONObject参数=新的JSONObject();
试一试{
参数put(“用户名”、“用户名称”);
参数put(“passwd”、“password”);
}捕获(JSONException e){
e、 printStackTrace();
}
JsonObjectRequest JSONObjectReq=新的JsonObjectRequest(Method.POST,
sSignupUrl,params,new Response.Listener(){
@凌驾
公共void onResponse(JSONObject响应){
LogUtil.d(“TAG”+response.toString());
}
},new Response.ErrorListener(){
@凌驾
公共无效onErrorResponse(截击错误){
d(“TAG”,“Error:+Error.getMessage());
}
}) {
@凌驾
公共映射getHeaders()引发AuthFailureError{
HashMap headers=新的HashMap();
headers.put(“内容类型”、“应用程序/json;字符集=utf-8”);
返回标题;
}
};
//将请求添加到请求队列
AppController.getInstance().addToRequestQueue(JSONOBJEQ);
当我使用URLConnection manager时,我可以成功地得到响应,但找不到错误,我已经通过google进行了搜索,但无法得到正确的解决方案,所有答案都是最受欢迎的
提前谢谢

我也遇到过同样的情况。我做错了的是,我在错误的
JsonObjectRequest中包含了
getHeaders()
(即使用了错误的url)
。但在我的情况下,我使用了自定义标题。检查你的网址。它可能不是正确的。它可能不接受此标题

如果你觉得我的问题无效,你能解决我的问题吗???请检查