Skip to content

Support Charset for character encoding in MockMvc #27231

@sbrannen

Description

@sbrannen

#27230 introduced support for configuring the default character encoding in the underlying MockHttpServletResponse used in MockMvc, using a Charset.

However, methods for supplying character encoding in MockHttpServletRequestBuilder and ContentResultMatchers currently accept a String.

To improve the developer experience and avoid the use of String literals, we should provide overloaded support via Charset for character encoding in MockHttpServletRequestBuilder and ContentResultMatchers.

Metadata

Metadata

Assignees

Labels

in: testIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions