Is there any way to modify request.format in a filter or controller?
I’m getting groovy.lang.GroovyRuntimeException: Cannot set read-only property: format no matter what I try. I need to manage my own content type negotiation in a request-neutral way, so a filter seems like the way to go.
The request.format call is handled by the RequestMimeTypesApi#getFormat method. I have not tested this, but think the following would work in a filter or controller: