In this post I found how to get the request object: Getting raw HTTP Data (Headers, Cookies, etc) in Google Cloud Endpoints
Anyway, when I try to read the input stream with Commons IO, i.e. IOUtils.toString(req.getInputStream(), StandardCharsets.UTF_8)
, it's empty (no exceptions though).
Even if this makes sense to me because all data have been read at least one time by the Endpoints Fw to deserialize the bean parameter, I've thought the request object was a HttpServletRequestWrapper object with an overridden getInputStream()
method to preserve whole data while reading many times.
Any suggestions?