Relative Content

Tag Archive for javascriptjavaspringrestgoogle-maps

Getting 415 on initial request, after that everything is working fine

When I start my App the first time I click on the map and click on the submit button, I am getting an Error “type=Unsupported Media Type, status=415”, when I click back and do the same thing again, it is working perfectly fine and doing what I am expecting. I am also getting a WARN : “org.springframework.web.HttpMediaTypeNotSupportedException: Content-Type ‘application/x-www-form-urlencoded;charset=UTF-8’ is not supported”. I have no ider why this is happening, since it should return application/json. When I use POST with Postman it is also returning the correct json.
It should also redirect to “/result” when I click the button, but it is stayin on “/game”. Again on second try, it is working fine.