I am using Slim framework POST API, when I post the parameters from the POSTMAN Tool to the post url its returning the response without any problem but when I tried to post the parameters from Android it is giving me the error
{error:{text:SQLSTATE[23000] : Integrity Constraint Voilation , Column Cannot be null.
My Andorid Code is as follows:
StringRequest stringRequest = new StringRequest(Request.Method.POST, "URL_TO_POST",
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
Toast.makeText(AddFeedbackActivity.this, response, Toast.LENGTH_LONG).show();
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Toast.makeText(AddFeedbackActivity.this, error.toString(), Toast.LENGTH_LONG).show();
}
}) {
@Override
protected Map<String, String> getParams() {
Map<String, String> params = new HashMap<String, String>();
params.put("comments", "1");
params.put("fname", "1");
params.put("mobile_no", "1");
return params;
}
};
RequestQueue requestQueue = Volley.newRequestQueue(AddFeedbackActivity.this);
requestQueue.add(stringRequest);
}**