Is there an alternative way to obtain a reference to a request’s body without using the approach with the annotation? I’m using GAE + Spring and everytime I use @RequestBody in the signatures of my controller methods, the server returns 415 Unsupported Media Type. All I’m trying to do is read a JSON encoded message on a Post method. Thanks.
Is there an alternative way to obtain a reference to a request’s body without
Share
You can take in a parameter of
HttpServletRequest, and read theServletInputStreamusinggetInputStream()from there. The stream will contain the body of the request.