$ curl -s -X POST localhost:8080/contact-record \ -H 'Content-Type: application/json' -H 'Accept: application/json' \ -d '{"email":"spammy@email.com","message":"This is spam."}' HTTP status: 400 Content-Type: null Body: '' (still empty!) # An Accept header alone changes nothing -- the body is still empty. What actually turns # on a structured error body is the spring.mvc.problemdetails.enabled property, which is # off by default and unrelated to content negotiation. See # docs/output/07-problemdetails-enabled-record-rejected.txt for the same request with it on.