I intend to some frontend technique that requires a custom content-type as response to a controller post.
I want to use thymleaf to produce my response like I do for my normal webpages. I know how to normally change the content type in the spring-mvc eco-system. But it seems that thymleaf is forcing another content-type on my behalf.
Here is the code
@PostMapping(path="/messages", produces = {"text/vnd.turbo-stream.html"})
public String messages(ModelMap model) {
return "messages";
}
But I'd rather select my content-type by hand. Is there a way?