I've got a basic Spring Boot app with a REST endpoint that is configured to receive POSTs with Content-Type = application/json.
My external partner is posting me HTTP requests, but apparently with a different Content-Type, because my app rejects those requests with HTTP 415 Unsupported Media Type.
Unfortunately, Spring's logs do not reveal what exactly the Content-Type is, and the external partner is currently unavailable for questions.
Is there a way to crank up Spring's log level so the log also includes the received Content-Type that's being rejected?
I see the following options as stated in the comments above:
Use the httpTrace actuator
The httptrace provides information about the HTTP request/response exchange. It can be called by doing a get to /actuator/httptrace. One can use curl:
or directly from your browser, on your local machine that would be http://localhost:8080/actuator/httptrace.
The information is provided as JSON: