Volley Post JsonObjectRequest ignoring parameters while using getHeader and getParams Volley Post JsonObjectRequest ignoring parameters while using getHeader and getParams json json

Volley Post JsonObjectRequest ignoring parameters while using getHeader and getParams


Volley will ignore your Content-Type setting, if you want to modify the content-type, you can override the getBodyContentType method :

JsonObjectRequest jsonObjReq = new JsonObjectRequest(Method.POST, url,        new JSONObject(params), response, response_error) {    @Override    public String getBodyContentType() {        return "application/json; charset=utf-8";    }}

for why volley ignore your parameters? take a look at my another answer.


Volley JsonObjectRequest Post request not working

Take the other answer from that post wich starts with: You can create a custom JSONObjectReuqest