Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Charset for character encoding in MockMvc #27231

Closed
sbrannen opened this issue Jul 30, 2021 · 0 comments
Closed

Support Charset for character encoding in MockMvc #27231

sbrannen opened this issue Jul 30, 2021 · 0 comments
Assignees
Labels
in: test Issues in the test module in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@sbrannen
Copy link
Member

#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.

@sbrannen sbrannen added in: test Issues in the test module in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement labels Jul 30, 2021
@sbrannen sbrannen added this to the 5.3.10 milestone Jul 30, 2021
@sbrannen sbrannen self-assigned this Jul 30, 2021
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this issue Mar 26, 2022
To improve the developer experience and avoid the use of String
literals, this commit provides overloaded support via Charset for
character encoding in MockHttpServletRequestBuilder and
ContentResultMatchers.

Closes spring-projectsgh-27231
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant