I am working on my first Android Application. What I am trying to do is a POST request to a REST service I want the BODY of this request to be a JSON String.
I am
Sorry folks, just turned out that the error was on the Rest service. I had change it and now it receives a String instead of the Reader object and it works as expected, the REST endpoint code on the server side now is:
@POST
@Path("/cadastrar/{userEmail}")
@Consumes(MediaType.APPLICATION_JSON)
public String cadastraPeso(@PathParam("userEmail") String email, String jsonString)
{
String json = jsonString;
if(json != null)
{
log.debug("String json received from device ==>> " + json);
}
return "OK - processed email ==>> " + email;
}
And the JSON string is correctly received on server side.
So de Android code above is working as expected.