I want to read post parameters and the body from a http post.
Example: If you post to the url: http://localhost/controller?sign=true. In the post there is also json data in the body.
{"transaction":
{"user":[
{"name": "Anna"}]
}
}
Getting the parameter is done via public java.lang.String getParameter(java.lang.String name)
And the body can be retrieved via public ServletInputStream getInputStream() throws java.io.IOException
But how do you get in hold of both the parameter and the body? Because if i call getParameter before getInputStream the result will be -1 on the inputStream.