I\'m trying to make a POST
request to my API and it works in Postman
(I get a valid JSON object), but not using Volley
. With the follo
400 error is because Content-Type is set wrong. Please do the following.
GetHeader function should be as
@Override
public Map getHeaders() throws AuthFailureError {
Map param = new HashMap();
return param;
}
Add this new override function.
@Override
public String getBodyContentType() {
return "application/json";
}