Android: Volley HTTP Request custom header
The JsonObjectRequest is extended JsonRequest which override getBody()
method directly, so your getParam() would never invoke, I recommend you extend StringRequest instead of JsonObjectRequest.
your can check this answer for more details.
by the way, you've another choice : Netroid, that based Volley, offered more features at all.
If you want to send your Map as a Json object (you are using the class JsonObjectRequest), you should put it in the JsonobjectRequest constructor :
HashMap<String, String> params = new HashMap<String, String>();
params.put("email", "[email protected]");
params.put("senha", "test");
params.put("X-API-TOKEN", "99KI9Gj68CgCf70deM22Ka64chef2C40Gm2lFJ2J0G9JkD0afd19MfacGf3FFm8CM1hG0eDiIk8");
JsonObjectRequest jsonObjReq = new JsonObjectRequest(url, new JSONObject(params), ..., ...);
See this tuto