This week's book giveaways are in the Cloud and AI/ML forums. We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line! See this thread and this one for details.
I have been struggling with this for a long time now. I have a simple app where I am posting data through AngularJS/Json. I have a Spring controller which works okay when I send the request through postmaster but when I use my angular form to post request, it is giving me a 400 Bad request. I get the following HttpMessageNotReadable Exception on the server. Please help.
Bear Bibeault wrote:OK, so you've solved the Angular problem. Congrats!
Now you have a Spring problem. I'll add this post to the Spring forum for you. I don't use Spring so I can't help you with that part.
Actually I solved half the problem. I don't think its a Spring problem because Spring works fine when I send data through browser tools. So, after your valuable suggestions, I changed the controller. I edited the post as well but it pending with the mods. The data request goes through but the response is coming out to be bad.
I am even able to see the String response in browser tools.
posted 3 years ago
I was able to resolve the latest error. I added produces="text/plain" in my Spring controller. Thanks @Bear Bibeault for all the valuable help!