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

Enhance MockHttpServletRequestBuilder with contentType(String) method [SPR-12405] #17013

Closed
spring-projects-issues opened this issue Nov 1, 2014 · 0 comments
Assignees
Labels
in: test type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Nov 1, 2014

Marcel Overdijk opened SPR-12405 and commented

MockHttpServletRequestBuilder already contains a contentType method accepting a MediaType:

public MockHttpServletRequestBuilder contentType(MediaType mediaType) {
     Assert.notNull(mediaType, "'contentType' must not be null");
     this.contentType = mediaType.toString();
     this.headers.set("Content-Type", this.contentType);
     return this;
}

Please add a similar method which accepts a plain String.


Affects: 4.1.1

Referenced from: commits bba38b8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants